diff options
Diffstat (limited to 'utils/themeeditor/skin_parser.c')
-rw-r--r-- | utils/themeeditor/skin_parser.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/themeeditor/skin_parser.c b/utils/themeeditor/skin_parser.c index 74ba7bd71d..4f7acf90fb 100644 --- a/utils/themeeditor/skin_parser.c +++ b/utils/themeeditor/skin_parser.c | |||
@@ -347,6 +347,7 @@ int skin_parse_tag(struct skin_element* element, char** document) | |||
347 | 347 | ||
348 | char tag_name[3]; | 348 | char tag_name[3]; |
349 | char* tag_args; | 349 | char* tag_args; |
350 | struct tag_info *tag; | ||
350 | 351 | ||
351 | int num_args = 1; | 352 | int num_args = 1; |
352 | int i; | 353 | int i; |
@@ -361,12 +362,12 @@ int skin_parse_tag(struct skin_element* element, char** document) | |||
361 | tag_name[2] = '\0'; | 362 | tag_name[2] = '\0'; |
362 | 363 | ||
363 | /* First we check the two characters after the '%', then a single char */ | 364 | /* First we check the two characters after the '%', then a single char */ |
364 | tag_args = find_tag(tag_name); | 365 | tag = find_tag(tag_name); |
365 | 366 | ||
366 | if(!tag_args) | 367 | if(!tag) |
367 | { | 368 | { |
368 | tag_name[1] = '\0'; | 369 | tag_name[1] = '\0'; |
369 | tag_args = find_tag(tag_name); | 370 | tag = find_tag(tag_name); |
370 | cursor++; | 371 | cursor++; |
371 | } | 372 | } |
372 | else | 373 | else |
@@ -374,7 +375,7 @@ int skin_parse_tag(struct skin_element* element, char** document) | |||
374 | cursor += 2; | 375 | cursor += 2; |
375 | } | 376 | } |
376 | 377 | ||
377 | if(!tag_args) | 378 | if(!tag) |
378 | { | 379 | { |
379 | skin_error(ILLEGAL_TAG); | 380 | skin_error(ILLEGAL_TAG); |
380 | return 0; | 381 | return 0; |
@@ -382,7 +383,8 @@ int skin_parse_tag(struct skin_element* element, char** document) | |||
382 | 383 | ||
383 | /* Copying basic tag info */ | 384 | /* Copying basic tag info */ |
384 | element->type = TAG; | 385 | element->type = TAG; |
385 | strcpy(element->name, tag_name); | 386 | element->tag = tag; |
387 | tag_args = tag->params; | ||
386 | element->line = skin_line; | 388 | element->line = skin_line; |
387 | 389 | ||
388 | /* Checking for the * flag */ | 390 | /* Checking for the * flag */ |