skin_engine: Fix %if() when comparing against a negative number.
If the tag being checked returns a negative number (e.g. %LI does that when the current list item does not have an icon) the tag's value would always end up being 1. Change-Id: I69ab175b6c46dd7567386e649732dbb8327972fc
This commit is contained in:
parent
befae2909f
commit
278e7457ea
2 changed files with 2 additions and 1 deletions
|
@ -598,7 +598,7 @@ static const char* NOINLINE get_lif_token_value(struct gui_wps *gwps,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case INTEGER:
|
case INTEGER:
|
||||||
if (!number_set && out_text && *out_text >= '0' && *out_text <= '9')
|
if (!number_set && out_text && ((*out_text >= '0' && *out_text <= '9') || (*out_text == '-' && out_text[1] >= '0' && out_text[1] <= '9')))
|
||||||
a = atoi(out_text);
|
a = atoi(out_text);
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case PERCENT:
|
case PERCENT:
|
||||||
|
|
|
@ -699,6 +699,7 @@ Michael Rey
|
||||||
Yuxuan Shui
|
Yuxuan Shui
|
||||||
James Buren
|
James Buren
|
||||||
Issa Beganović
|
Issa Beganović
|
||||||
|
Georg Gadinger
|
||||||
|
|
||||||
The libmad team
|
The libmad team
|
||||||
The wavpack team
|
The wavpack team
|
||||||
|
|
Loading…
Reference in a new issue