forked from len0rd/rockbox
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
This commit is contained in:
parent
5943f4c5e2
commit
279969618d
3 changed files with 51 additions and 32 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue