diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-04-14 16:20:33 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-04-14 16:20:33 +0000 |
commit | 32bd59d4f75f135b26a537f438e0d6b893f1cdfb (patch) | |
tree | a6e03ddfedac47ae41aad9a864bb6cc84e3bb123 /apps | |
parent | bf51888eb1fefadda02d6d1604ffcb9cdfc40b5b (diff) | |
download | rockbox-32bd59d4f75f135b26a537f438e0d6b893f1cdfb.tar.gz rockbox-32bd59d4f75f135b26a537f438e0d6b893f1cdfb.zip |
Better error checking for the image display tag (%xdn). Should prevent problems with the former crossfeed tag (%xd) when used in a conditional construct.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13158 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/wps_parser.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index c0a1202eb8..e72079ce71 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c | |||
@@ -357,6 +357,14 @@ static int parse_image_display(const char *wps_bufptr, | |||
357 | struct wps_data *wps_data) | 357 | struct wps_data *wps_data) |
358 | { | 358 | { |
359 | int n = get_image_id(*wps_bufptr); | 359 | int n = get_image_id(*wps_bufptr); |
360 | |||
361 | if (n == -1) | ||
362 | { | ||
363 | /* invalid picture display tag */ | ||
364 | token->type = WPS_TOKEN_UNKNOWN; | ||
365 | return 0; | ||
366 | } | ||
367 | |||
360 | token->value.i = n; | 368 | token->value.i = n; |
361 | 369 | ||
362 | /* if the image is in a conditional, remember it */ | 370 | /* if the image is in a conditional, remember it */ |