diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2012-07-05 22:41:10 +1000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2012-07-05 22:41:10 +1000 |
commit | 4c94b98422b7a0e0ef1eb93eac2f3abd7fdfa9b8 (patch) | |
tree | 7cec2d1b85368dc10f5de2e3ec276e3a91810953 | |
parent | c413591e7ee1184efde80283705d3061d90432f8 (diff) | |
download | rockbox-4c94b98422b7a0e0ef1eb93eac2f3abd7fdfa9b8.tar.gz rockbox-4c94b98422b7a0e0ef1eb93eac2f3abd7fdfa9b8.zip |
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
-rw-r--r-- | lib/skin_parser/skin_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/skin_parser/skin_parser.c b/lib/skin_parser/skin_parser.c index 44a1c03245..748ea5da22 100644 --- a/lib/skin_parser/skin_parser.c +++ b/lib/skin_parser/skin_parser.c | |||
@@ -617,7 +617,7 @@ static int skin_parse_tag(struct skin_element* element, const char** document) | |||
617 | /* Checking for comments */ | 617 | /* Checking for comments */ |
618 | if(*cursor == COMMENTSYM) | 618 | if(*cursor == COMMENTSYM) |
619 | skip_comment(&cursor); | 619 | skip_comment(&cursor); |
620 | 620 | ||
621 | if (*tag_args == '[') | 621 | if (*tag_args == '[') |
622 | { | 622 | { |
623 | /* we need to guess which type of param it is. | 623 | /* 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) | |||
782 | { | 782 | { |
783 | if (i+1 == num_args) | 783 | if (i+1 == num_args) |
784 | tag_args += 2; | 784 | tag_args += 2; |
785 | else if (open_square_bracket) | 785 | else if (open_square_bracket && *tag_args == ']') |
786 | { | 786 | { |
787 | tag_args = open_square_bracket; | 787 | tag_args = open_square_bracket; |
788 | open_square_bracket = NULL; | 788 | open_square_bracket = NULL; |