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 | |
| parent | bf51888eb1fefadda02d6d1604ffcb9cdfc40b5b (diff) | |
| download | rockbox-32bd59d4f75f135b26a537f438e0d6b893f1cdfb.zip rockbox-32bd59d4f75f135b26a537f438e0d6b893f1cdfb.tar.gz rockbox-32bd59d4f75f135b26a537f438e0d6b893f1cdfb.tar.bz2 rockbox-32bd59d4f75f135b26a537f438e0d6b893f1cdfb.tar.xz | |
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
| -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 c0a1202..e72079c 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, struct wps_data *wps_data) { int n = get_image_id(*wps_bufptr); + + if (n == -1) + { + /* invalid picture display tag */ + token->type = WPS_TOKEN_UNKNOWN; + return 0; + } + token->value.i = n; /* if the image is in a conditional, remember it */ |