diff options
Diffstat (limited to 'fontconfig/src/fcxml.c')
-rw-r--r-- | fontconfig/src/fcxml.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c index d92cbcc66..e6fdf7f7e 100644 --- a/fontconfig/src/fcxml.c +++ b/fontconfig/src/fcxml.c @@ -1847,6 +1847,9 @@ FcParseUnary (FcConfigParse *parse, FcOp op) static void FcParseDir (FcConfigParse *parse) { +#ifdef _WIN32 + FcChar8 buffer[MAX_PATH]; +#endif const FcChar8 *attr, *data; FcChar8 *prefix = NULL; @@ -1883,7 +1886,7 @@ FcParseDir (FcConfigParse *parse) if (!GetModuleFileName (NULL, buffer, sizeof (buffer) - 20)) { FcConfigMessage (parse, FcSevereError, "GetModuleFileName failed"); - break; + goto bail; } /* * Must use the multi-byte aware function to search @@ -1902,7 +1905,7 @@ FcParseDir (FcConfigParse *parse) if (!GetModuleFileName (NULL, buffer, sizeof (buffer) - 20)) { FcConfigMessage (parse, FcSevereError, "GetModuleFileName failed"); - break; + goto bail; } p = _mbsrchr (data, '\\'); if (p) *p = '\0'; @@ -1916,7 +1919,7 @@ FcParseDir (FcConfigParse *parse) if (rc == 0 || rc > sizeof (buffer) - 20) { FcConfigMessage (parse, FcSevereError, "GetSystemWindowsDirectory failed"); - break; + goto bail; } if (data [strlen (data) - 1] != '\\') strcat (data, "\\"); |