mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-26 23:36:37 -04:00
skin_engine: Fix a obscure parser bug
Tag params where a [] group is followed (but not immediatly) by a * will not parse correctly. e.g [si]iii|s* will attempt to find an 'i' after the second s instead of looping s's Change-Id: I3982f726b6539818f8332334b263b673259f98ef
This commit is contained in:
parent
c413591e7e
commit
4c94b98422
1 changed files with 2 additions and 2 deletions
|
|
@ -617,7 +617,7 @@ static int skin_parse_tag(struct skin_element* element, const char** document)
|
||||||
/* Checking for comments */
|
/* Checking for comments */
|
||||||
if(*cursor == COMMENTSYM)
|
if(*cursor == COMMENTSYM)
|
||||||
skip_comment(&cursor);
|
skip_comment(&cursor);
|
||||||
|
|
||||||
if (*tag_args == '[')
|
if (*tag_args == '[')
|
||||||
{
|
{
|
||||||
/* we need to guess which type of param it is.
|
/* we need to guess which type of param it is.
|
||||||
|
|
@ -782,7 +782,7 @@ static int skin_parse_tag(struct skin_element* element, const char** document)
|
||||||
{
|
{
|
||||||
if (i+1 == num_args)
|
if (i+1 == num_args)
|
||||||
tag_args += 2;
|
tag_args += 2;
|
||||||
else if (open_square_bracket)
|
else if (open_square_bracket && *tag_args == ']')
|
||||||
{
|
{
|
||||||
tag_args = open_square_bracket;
|
tag_args = open_square_bracket;
|
||||||
open_square_bracket = NULL;
|
open_square_bracket = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue