diff options
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 13 | ||||
-rw-r--r-- | apps/gui/skin_engine/wps_internals.h | 14 |
2 files changed, 9 insertions, 18 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, | |||
983 | return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl7 */ | 983 | return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl7 */ |
984 | 984 | ||
985 | _pos = wps_bufptr + 1; | 985 | _pos = wps_bufptr + 1; |
986 | if (!isdigit(*_pos)) | 986 | _pos = parse_list("dd", NULL, '|', _pos, &aa->albumart_x, &aa->albumart_y); |
987 | return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl|@ */ | ||
988 | aa->albumart_x = atoi(_pos); | ||
989 | 987 | ||
990 | _pos = strchr(_pos, '|'); | 988 | if (!_pos || _pos > newline || *_pos != '|') |
991 | if (!_pos || _pos > newline || !isdigit(*(++_pos))) | ||
992 | return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl|7\n or %Cl|7|@ */ | ||
993 | |||
994 | aa->albumart_y = atoi(_pos); | ||
995 | |||
996 | _pos = strchr(_pos, '|'); | ||
997 | if (!_pos || _pos > newline) | ||
998 | return WPS_ERROR_INVALID_PARAM; /* malformed token: no | after y coordinate | 989 | return WPS_ERROR_INVALID_PARAM; /* malformed token: no | after y coordinate |
999 | e.g. %Cl|7|59\n */ | 990 | e.g. %Cl|7|59\n */ |
1000 | 991 | ||
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h index e2330a777e..a5fc70d1ef 100644 --- a/apps/gui/skin_engine/wps_internals.h +++ b/apps/gui/skin_engine/wps_internals.h | |||
@@ -226,15 +226,15 @@ struct touchregion { | |||
226 | struct skin_albumart { | 226 | struct skin_albumart { |
227 | /* Album art support */ | 227 | /* Album art support */ |
228 | struct viewport *vp;/* The viewport this is in */ | 228 | struct viewport *vp;/* The viewport this is in */ |
229 | unsigned char wps_uses_albumart; /* WPS_ALBUMART_NONE, _CHECK, _LOAD */ | 229 | int albumart_x; |
230 | short albumart_x; | 230 | int albumart_y; |
231 | short albumart_y; | 231 | int albumart_max_width; |
232 | unsigned char albumart_xalign; /* WPS_ALBUMART_ALIGN_LEFT, _CENTER, _RIGHT */ | 232 | int albumart_max_height; |
233 | unsigned char albumart_yalign; /* WPS_ALBUMART_ALIGN_TOP, _CENTER, _BOTTOM */ | ||
234 | short albumart_max_width; | ||
235 | short albumart_max_height; | ||
236 | 233 | ||
237 | bool draw; | 234 | bool draw; |
235 | unsigned char albumart_xalign; /* WPS_ALBUMART_ALIGN_LEFT, _CENTER, _RIGHT */ | ||
236 | unsigned char albumart_yalign; /* WPS_ALBUMART_ALIGN_TOP, _CENTER, _BOTTOM */ | ||
237 | unsigned char wps_uses_albumart; /* WPS_ALBUMART_NONE, _CHECK, _LOAD */ | ||
238 | }; | 238 | }; |
239 | #endif | 239 | #endif |
240 | 240 | ||