forked from len0rd/rockbox
Theme Editor: Fixed a small bug with asterisk handling in tag parameter argument codes and fixed bugs with handling escaped characters
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26460 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f02a2446d3
commit
999990c234
3 changed files with 9 additions and 3 deletions
|
|
@ -257,7 +257,7 @@ struct skin_element* skin_parse_line_optional(char** document, int conditional)
|
|||
if(!skin_parse_conditional(current, &cursor))
|
||||
return NULL;
|
||||
}
|
||||
else if(*cursor == TAGSYM)
|
||||
else if(*cursor == TAGSYM && !find_escape_character(cursor[1]))
|
||||
{
|
||||
if(!skin_parse_tag(current, &cursor))
|
||||
return NULL;
|
||||
|
|
@ -557,7 +557,7 @@ int skin_parse_tag(struct skin_element* element, char** document)
|
|||
}
|
||||
|
||||
/* Checking for a premature end */
|
||||
if(*tag_args != '\0' && !(optional && !star))
|
||||
if(*tag_args != '\0' && !optional)
|
||||
{
|
||||
skin_error(INSUFFICIENT_ARGS);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@ char* scan_string(char** document)
|
|||
continue;
|
||||
}
|
||||
|
||||
if(*cursor == TAGSYM)
|
||||
cursor++;
|
||||
|
||||
if(*cursor == '\n')
|
||||
{
|
||||
skin_error(UNEXPECTED_NEWLINE);
|
||||
|
|
@ -77,6 +80,9 @@ char* scan_string(char** document)
|
|||
buffer[length] = '\0';
|
||||
for(i = 0; i < length; i++)
|
||||
{
|
||||
if(*cursor == TAGSYM)
|
||||
cursor++;
|
||||
|
||||
if(*cursor == COMMENTSYM)
|
||||
{
|
||||
skip_comment(&cursor);
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ int find_escape_character(char lookup)
|
|||
while(*current != lookup && *current != '\0')
|
||||
current++;
|
||||
|
||||
if(*current == lookup)
|
||||
if(*current == lookup && *current)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue