forked from len0rd/rockbox
Theme Editor: Fixed bug in parser handling empty lines and made ParseTreeModel handle the new VIEWPORT element properly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26792 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0cca15c6d0
commit
3c95dbb208
6 changed files with 34 additions and 13 deletions
|
@ -249,9 +249,19 @@ static struct skin_element* skin_parse_line_optional(char** document,
|
|||
retval = skin_alloc_element();
|
||||
retval->type = LINE;
|
||||
retval->line = skin_line;
|
||||
if(*cursor != '\0')
|
||||
if(*cursor != '\0' && *cursor != '\n'
|
||||
&& !(conditional && (*cursor == ARGLISTSEPERATESYM
|
||||
|| *cursor == ARGLISTCLOSESYM
|
||||
|| *cursor == ENUMLISTSEPERATESYM
|
||||
|| *cursor == ENUMLISTCLOSESYM)))
|
||||
{
|
||||
retval->children_count = 1;
|
||||
else retval->children_count = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
retval->children_count = 0;
|
||||
}
|
||||
|
||||
if(retval->children_count > 0)
|
||||
retval->children = skin_alloc_children(1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue