summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-06-25 21:22:18 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-06-25 21:22:18 +0000
commit20c19dde350b40678163c0d6baeddb23e9087780 (patch)
tree3236810ce8065056ad1f842dd510a1ec792b7462 /apps
parentaf50cae14d9b5b1883789034e4af94e4c25fed94 (diff)
downloadrockbox-20c19dde350b40678163c0d6baeddb23e9087780.zip
rockbox-20c19dde350b40678163c0d6baeddb23e9087780.tar.gz
rockbox-20c19dde350b40678163c0d6baeddb23e9087780.tar.bz2
rockbox-20c19dde350b40678163c0d6baeddb23e9087780.tar.xz
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')
-rw-r--r--apps/wps-display.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 8afb803..e7c5472 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -854,9 +854,14 @@ static void format_display(char* buf,
}
#endif
/* skip the tag */
-/* WARNING! This will crash if there's a syntax error in the wps file */
for (n = 0; n < 4; n++) {
- fmt = strchr(fmt+1, '|'); /* get the next '|' */
+ char *ptr;
+ ptr = strchr(fmt+1, '|'); /* get the next '|' */
+ if(ptr)
+ fmt=ptr;
+ else
+ /* syntax error, bail out of loop */
+ break;
}
fmt++;
break;