From 279969618d28e23ac83b6e81c7b7bbf1adaf5b74 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Tue, 1 Jun 2010 20:19:51 +0000 Subject: Theme Editor: Made text and comments editable from a treeview git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26453 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/skin_parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'utils/themeeditor/skin_parser.c') diff --git a/utils/themeeditor/skin_parser.c b/utils/themeeditor/skin_parser.c index d118e9b..c0f1849 100644 --- a/utils/themeeditor/skin_parser.c +++ b/utils/themeeditor/skin_parser.c @@ -738,6 +738,7 @@ int skin_parse_comment(struct skin_element* element, char** document) */ for(length = 0; cursor[length] != '\n' && cursor[length] != '\0'; length++); + length--; element->type = COMMENT; element->line = skin_line; element->text = skin_alloc_string(length); @@ -745,10 +746,10 @@ int skin_parse_comment(struct skin_element* element, char** document) memcpy((void*)(element->text), (void*)(cursor + 1), sizeof(char) * length); element->text[length] = '\0'; - if(cursor[length] == '\n') + if(cursor[length + 1] == '\n') skin_line++; - *document += (length + 1); /* Move cursor up past # and all text */ + *document += (length + 2); /* Move cursor up past # and all text */ return 1; } -- cgit v1.1