summaryrefslogtreecommitdiff
path: root/utils/themeeditor/skin_parser.c
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-11 19:51:34 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-11 19:51:34 +0000
commit3c95dbb20859debe99edc874c57ddaa6f3acf3d2 (patch)
tree5198c578f6f4d769578676b94035824731b15771 /utils/themeeditor/skin_parser.c
parent0cca15c6d03991b9c169fdf4e0760f90928712a0 (diff)
downloadrockbox-3c95dbb20859debe99edc874c57ddaa6f3acf3d2.zip
rockbox-3c95dbb20859debe99edc874c57ddaa6f3acf3d2.tar.gz
rockbox-3c95dbb20859debe99edc874c57ddaa6f3acf3d2.tar.bz2
rockbox-3c95dbb20859debe99edc874c57ddaa6f3acf3d2.tar.xz
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
Diffstat (limited to 'utils/themeeditor/skin_parser.c')
-rw-r--r--utils/themeeditor/skin_parser.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/utils/themeeditor/skin_parser.c b/utils/themeeditor/skin_parser.c
index e6a6350..bf7ca8d 100644
--- a/utils/themeeditor/skin_parser.c
+++ b/utils/themeeditor/skin_parser.c
@@ -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);