X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c542a4de0862ab3e46f4a3c76797ae94ab9de60..a0845d45830eb22769107a61a6cb3485fa21922b:/src/unix/fontutil.cpp?ds=inline diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index 84d09f9931..f58ac65107 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -139,7 +139,11 @@ wxString wxNativeFontInfo::GetFaceName() const wxFontFamily wxNativeFontInfo::GetFamily() const { wxFontFamily ret = wxFONTFAMILY_DEFAULT; - char *family_text = g_ascii_strdown( pango_font_description_get_family( description ), -1 ); + // note: not passing -1 as the 2nd parameter to g_ascii_strdown to work + // around a bug in the 64-bit glib shipped with solaris 10, -1 causes it + // to try to allocate 2^32 bytes. + const char *family_name = pango_font_description_get_family( description ); + char *family_text = g_ascii_strdown( family_name, family_name ? strlen( family_name ) : 0 ); // Check for some common fonts, to salvage what we can from the current win32 centric wxFont API: if (strncmp( family_text, "monospace", 9 ) == 0) ret = wxFONTFAMILY_TELETYPE; // begins with "Monospace"