diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-06-25 21:22:18 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-06-25 21:22:18 +0000 |
commit | 20c19dde350b40678163c0d6baeddb23e9087780 (patch) | |
tree | 3236810ce8065056ad1f842dd510a1ec792b7462 /apps/wps-display.c | |
parent | af50cae14d9b5b1883789034e4af94e4c25fed94 (diff) | |
download | rockbox-20c19dde350b40678163c0d6baeddb23e9087780.tar.gz rockbox-20c19dde350b40678163c0d6baeddb23e9087780.zip |
No need to keep code around that we _know_ will cause crashes... Bail out
nicer when certain syntax errors are used with the bitmap option.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6867 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r-- | apps/wps-display.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c index 8afb803856..e7c5472ea9 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c | |||
@@ -854,9 +854,14 @@ static void format_display(char* buf, | |||
854 | } | 854 | } |
855 | #endif | 855 | #endif |
856 | /* skip the tag */ | 856 | /* skip the tag */ |
857 | /* WARNING! This will crash if there's a syntax error in the wps file */ | ||
858 | for (n = 0; n < 4; n++) { | 857 | for (n = 0; n < 4; n++) { |
859 | fmt = strchr(fmt+1, '|'); /* get the next '|' */ | 858 | char *ptr; |
859 | ptr = strchr(fmt+1, '|'); /* get the next '|' */ | ||
860 | if(ptr) | ||
861 | fmt=ptr; | ||
862 | else | ||
863 | /* syntax error, bail out of loop */ | ||
864 | break; | ||
860 | } | 865 | } |
861 | fmt++; | 866 | fmt++; |
862 | break; | 867 | break; |