From 9b4e7845602683882577aa9fe52aa55f3874a341 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Mon, 14 Mar 2022 17:16:48 -0400 Subject: BUGFIX string_option parsers fix bugs introduced in the switch over to using string_option instead of if else strcmp trees, embedded album art should work again skin parser had an error for 'noborder' and 'nobar' Change-Id: I957d81e5fa8467b33bbd93d63c4428c36100acca --- apps/gui/skin_engine/skin_parser.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'apps/gui/skin_engine') diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index a9b1ef4706..ee32c06ace 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -1051,12 +1051,15 @@ static int parse_progressbar_tag(struct skin_element* element, enum { eINVERT = 0, eNOFILL, eNOBORDER, eNOBAR, eSLIDER, eIMAGE, - eBACKDROP, eVERTICAL, eHORIZONTAL, eNOTOUCH, eSETTING + eBACKDROP, eVERTICAL, eHORIZONTAL, eNOTOUCH, eSETTING, + e_PB_TAG_COUNT }; - static const char *pb_options[] = {"invert", "nofill", "noborder, nobar", "slider", - "image", "backdrop", "vertical", "horizontal", - "notouch", "setting", NULL}; + static const char *pb_options[e_PB_TAG_COUNT + 1] = {[eINVERT] = "invert", + [eNOFILL] = "nofill", [eNOBORDER] = "noborder", [eNOBAR] = "nobar", + [eSLIDER] = "slider", [eIMAGE] = "image", [eBACKDROP] = "backdrop", + [eVERTICAL] = "vertical", [eHORIZONTAL] = "horizontal", + [eNOTOUCH] = "notouch", [eSETTING] = "setting", [e_PB_TAG_COUNT] = NULL}; int pb_op; while (curr_param < element->params_count) @@ -1409,7 +1412,7 @@ static int parse_skinvar( struct skin_element *element, if (!isdefault(get_param(element, 2))) data->newval = get_param(element, 2)->data.number; - else if (sv_op == 0) /*touch*/ + else if (sv_op != 0) /*!touch*/ return WPS_ERROR_INVALID_PARAM; data->max = 0; if (sv_op == 1) /*set*/ -- cgit v1.2.3