MONO_ARCH_SAVE_REGS;
g_assert (this->number_format != 0);
+ if (this->number_index < 0)
+ return;
number = this->number_format;
nfe = &number_format_entries [this->number_index];
if (entry->lcid != entry->specific_lcid)
entry = culture_info_entry_from_lcid (entry->specific_lcid);
- return construct_culture (ci, entry);
+ if (entry)
+ return construct_culture (ci, entry);
+ else
+ return FALSE;
}
static const CultureInfoEntry*
const gchar *p;
gchar *c;
-#ifdef PLATFORM_WIN32
+#ifdef HOST_WIN32
locale = g_win32_getlocale ();
#else
locale = get_posix_locale ();
if ((p = strchr (locale, '.')) != NULL) {
/* assume new locale can't be larger than old one? */
- corrected = malloc (strlen (locale));
+ corrected = g_malloc (strlen (locale));
strncpy (corrected, locale, p - locale);
corrected [p - locale] = 0;
*/
if (corrected == NULL) {
- corrected = malloc (strlen (locale));
+ corrected = g_malloc (strlen (locale));
strncpy (corrected, locale, p - locale);
corrected [p - locale] = 0;
}