lang_load(): ignore unused field from the lang file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28133 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7c339c937a
commit
94f5f5b2fd
1 changed files with 4 additions and 2 deletions
|
@ -65,7 +65,7 @@ int lang_load(const char *filename, const unsigned char *builtin,
|
|||
int retcode=0;
|
||||
unsigned char lang_header[HEADER_SIZE];
|
||||
unsigned char sub_header[SUBHEADER_SIZE];
|
||||
unsigned int id, num_strings, foffset;
|
||||
unsigned int id, foffset;
|
||||
|
||||
if(fd < 0)
|
||||
return 1;
|
||||
|
@ -77,7 +77,9 @@ int lang_load(const char *filename, const unsigned char *builtin,
|
|||
lseek(fd, user_num * SUBHEADER_SIZE, SEEK_CUR);
|
||||
read(fd, sub_header, SUBHEADER_SIZE);
|
||||
/* read in information about the requested lang */
|
||||
num_strings = (sub_header[0]<<8) | sub_header[1];
|
||||
#if 0 /* unused */
|
||||
unsigned int num_strings = (sub_header[0]<<8) | sub_header[1];
|
||||
#endif
|
||||
lang_size = (sub_header[2]<<8) | sub_header[3];
|
||||
foffset = (sub_header[4]<<8) | sub_header[5];
|
||||
if(lang_size <= max_lang_size) {
|
||||
|
|
Loading…
Reference in a new issue