diff options
Diffstat (limited to 'utils/themeeditor/skin_parser.c')
-rw-r--r-- | utils/themeeditor/skin_parser.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/themeeditor/skin_parser.c b/utils/themeeditor/skin_parser.c index d118e9b97b..c0f1849523 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) | |||
738 | */ | 738 | */ |
739 | for(length = 0; cursor[length] != '\n' && cursor[length] != '\0'; length++); | 739 | for(length = 0; cursor[length] != '\n' && cursor[length] != '\0'; length++); |
740 | 740 | ||
741 | length--; | ||
741 | element->type = COMMENT; | 742 | element->type = COMMENT; |
742 | element->line = skin_line; | 743 | element->line = skin_line; |
743 | element->text = skin_alloc_string(length); | 744 | element->text = skin_alloc_string(length); |
@@ -745,10 +746,10 @@ int skin_parse_comment(struct skin_element* element, char** document) | |||
745 | memcpy((void*)(element->text), (void*)(cursor + 1), sizeof(char) * length); | 746 | memcpy((void*)(element->text), (void*)(cursor + 1), sizeof(char) * length); |
746 | element->text[length] = '\0'; | 747 | element->text[length] = '\0'; |
747 | 748 | ||
748 | if(cursor[length] == '\n') | 749 | if(cursor[length + 1] == '\n') |
749 | skin_line++; | 750 | skin_line++; |
750 | 751 | ||
751 | *document += (length + 1); /* Move cursor up past # and all text */ | 752 | *document += (length + 2); /* Move cursor up past # and all text */ |
752 | 753 | ||
753 | return 1; | 754 | return 1; |
754 | } | 755 | } |