summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-09-25 01:43:31 +0000
committerThomas Martitz <kugel@rockbox.org>2009-09-25 01:43:31 +0000
commit89041f6b4a14cf1ac4eaca2ccb462d0eab8909a6 (patch)
tree4f23f0f668f0b6dbd8be29e50b3f52f6dc5cab35 /apps/gui
parent68089db6db83e78fa6637984612c81226a33b02b (diff)
Remove some some code in favor of a single parse_list() call.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22826 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/skin_engine/skin_parser.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index ede1871414..b03bdb013d 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -983,18 +983,9 @@ static int parse_albumart_load(const char *wps_bufptr,
return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl7 */
_pos = wps_bufptr + 1;
- if (!isdigit(*_pos))
- return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl|@ */
- aa->albumart_x = atoi(_pos);
+ _pos = parse_list("dd", NULL, '|', _pos, &aa->albumart_x, &aa->albumart_y);
- _pos = strchr(_pos, '|');
- if (!_pos || _pos > newline || !isdigit(*(++_pos)))
- return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl|7\n or %Cl|7|@ */
-
- aa->albumart_y = atoi(_pos);
-
- _pos = strchr(_pos, '|');
- if (!_pos || _pos > newline)
+ if (!_pos || _pos > newline || *_pos != '|')
return WPS_ERROR_INVALID_PARAM; /* malformed token: no | after y coordinate
e.g. %Cl|7|59\n */