forked from len0rd/rockbox
Bugfix: Due to the wrong position of the LANG_LAST_INDEX_IN_ARRAY marker, lang_load() was potentially unsafe. Loading a newer .lng file with an older rockbox build would have caused an out-of-bound access of language_strings[].
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5607 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cb7a3d27e2
commit
3c2fefdb99
1 changed files with 6 additions and 3 deletions
|
|
@ -100,15 +100,18 @@ for(@hfile) {
|
|||
print HFILE " $_,\n";
|
||||
}
|
||||
|
||||
print HFILE " /* --- below this follows voice-only strings --- */\n",
|
||||
" VOICEONLY_DELIMITER = 0x8000,\n";
|
||||
print HFILE <<MOO
|
||||
LANG_LAST_INDEX_IN_ARRAY, /* this is not a string, this is a marker */
|
||||
/* --- below this follows voice-only strings --- */
|
||||
VOICEONLY_DELIMITER = 0x8000,
|
||||
MOO
|
||||
;
|
||||
|
||||
for(@vfile) {
|
||||
print HFILE " $_,\n";
|
||||
}
|
||||
|
||||
print HFILE <<MOO
|
||||
LANG_LAST_INDEX_IN_ARRAY /* this is not a string, this is a marker */
|
||||
};
|
||||
/* end of generated enum list */
|
||||
MOO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue