diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-09-21 08:25:52 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-09-21 08:25:52 +0000 |
commit | 94f5f5b2fd89dc2d1bf42c2e1440da57f4e6611d (patch) | |
tree | 120c75638a93d72cba7c7a22e7fbf65cf5f222f3 | |
parent | 7c339c937a619158f5e6a90d08c6830756fe9f47 (diff) | |
download | rockbox-94f5f5b2fd89dc2d1bf42c2e1440da57f4e6611d.tar.gz rockbox-94f5f5b2fd89dc2d1bf42c2e1440da57f4e6611d.zip |
lang_load(): ignore unused field from the lang file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28133 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/language.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/language.c b/apps/language.c index 39903c4346..f8ec0a3087 100644 --- a/apps/language.c +++ b/apps/language.c | |||
@@ -65,7 +65,7 @@ int lang_load(const char *filename, const unsigned char *builtin, | |||
65 | int retcode=0; | 65 | int retcode=0; |
66 | unsigned char lang_header[HEADER_SIZE]; | 66 | unsigned char lang_header[HEADER_SIZE]; |
67 | unsigned char sub_header[SUBHEADER_SIZE]; | 67 | unsigned char sub_header[SUBHEADER_SIZE]; |
68 | unsigned int id, num_strings, foffset; | 68 | unsigned int id, foffset; |
69 | 69 | ||
70 | if(fd < 0) | 70 | if(fd < 0) |
71 | return 1; | 71 | return 1; |
@@ -77,7 +77,9 @@ int lang_load(const char *filename, const unsigned char *builtin, | |||
77 | lseek(fd, user_num * SUBHEADER_SIZE, SEEK_CUR); | 77 | lseek(fd, user_num * SUBHEADER_SIZE, SEEK_CUR); |
78 | read(fd, sub_header, SUBHEADER_SIZE); | 78 | read(fd, sub_header, SUBHEADER_SIZE); |
79 | /* read in information about the requested lang */ | 79 | /* read in information about the requested lang */ |
80 | num_strings = (sub_header[0]<<8) | sub_header[1]; | 80 | #if 0 /* unused */ |
81 | unsigned int num_strings = (sub_header[0]<<8) | sub_header[1]; | ||
82 | #endif | ||
81 | lang_size = (sub_header[2]<<8) | sub_header[3]; | 83 | lang_size = (sub_header[2]<<8) | sub_header[3]; |
82 | foffset = (sub_header[4]<<8) | sub_header[5]; | 84 | foffset = (sub_header[4]<<8) | sub_header[5]; |
83 | if(lang_size <= max_lang_size) { | 85 | if(lang_size <= max_lang_size) { |