diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index d3d4911a16..577e1aa1cb 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -726,6 +726,11 @@ static int parse_font_load(const char *wps_bufptr, | |||
726 | DEBUGF("font id %d already being used\n", id); | 726 | DEBUGF("font id %d already being used\n", id); |
727 | } | 727 | } |
728 | #endif | 728 | #endif |
729 | /* make sure the filename contains .fnt, | ||
730 | * we dont actually use it, but require it anyway */ | ||
731 | ptr = strchr(filename, '.'); | ||
732 | if (!ptr || strncmp(ptr, ".fnt|", 5)) | ||
733 | return WPS_ERROR_INVALID_PARAM; | ||
729 | skinfonts[id-FONT_FIRSTUSERFONT].id = -1; | 734 | skinfonts[id-FONT_FIRSTUSERFONT].id = -1; |
730 | skinfonts[id-FONT_FIRSTUSERFONT].name = filename; | 735 | skinfonts[id-FONT_FIRSTUSERFONT].name = filename; |
731 | 736 | ||
@@ -2113,8 +2118,8 @@ static bool skin_load_fonts(struct wps_data *data) | |||
2113 | * multiple viewports use the same */ | 2118 | * multiple viewports use the same */ |
2114 | if (font->id < 0) | 2119 | if (font->id < 0) |
2115 | { | 2120 | { |
2116 | char *bar = strchr(font->name, '|'); | 2121 | char *dot = strchr(font->name, '.'); |
2117 | *bar = '\0'; | 2122 | *dot = '\0'; |
2118 | font->id = skin_font_load(font->name); | 2123 | font->id = skin_font_load(font->name); |
2119 | } | 2124 | } |
2120 | 2125 | ||