diff options
Diffstat (limited to 'newlib/libc/locale/duplocale.c')
-rw-r--r-- | newlib/libc/locale/duplocale.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/locale/duplocale.c b/newlib/libc/locale/duplocale.c index 06ebfcd6e..9f6156cb4 100644 --- a/newlib/libc/locale/duplocale.c +++ b/newlib/libc/locale/duplocale.c @@ -64,7 +64,8 @@ _duplocale_r (struct _reent *p, struct __locale_t *locobj) __loadlocale. It knows what to do to replicate the category. */ tmp_locale.lc_cat[i].ptr = NULL; tmp_locale.lc_cat[i].buf = NULL; - if (!__loadlocale (&tmp_locale, i, tmp_locale.categories[i])) + tmp_locale.categories[i][0] = '\0'; /* __loadlocale tests this! */ + if (!__loadlocale (&tmp_locale, i, locobj->categories[i])) goto error; } #endif /* __HAVE_LOCALE_INFO__ */ |