Skip to content

Commit cddc3d0

Browse files
authored
fix(legacy): move i18n languages item from .bss to .rodata segment which save ram use to avoid stack overflow (#554)
1 parent aa1975d commit cddc3d0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

legacy/firmware/language.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "language.h"
22

3-
const char *languages[][2] = {
3+
const char *const languages[][2] = {
44
//
55
{" Disabled", "已禁用"},
66
{" Enabled", "已启用"},

legacy/firmware/language.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef __LANGUAGE_H__
22
#define __LANGUAGE_H__
33

4-
extern const char *languages[][2];
4+
extern const char* const languages[][2];
55

66
extern int LANGUAGE_ITEMS;
77

0 commit comments

Comments
 (0)