From 8106c1b06abc25bcd5adf33fc30b74abf7cfdeda Mon Sep 17 00:00:00 2001 From: phantom Date: Sun, 11 Feb 2001 15:07:26 +0000 Subject: Don't try to convert grouping strings in case if C or POSIX locale was explicitly specified. Submitted by: ache --- lib/libc/locale/lmonetary.c | 2 +- lib/libc/locale/lnumeric.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/locale/lmonetary.c b/lib/libc/locale/lmonetary.c index e42c6c5..8e98749 100644 --- a/lib/libc/locale/lmonetary.c +++ b/lib/libc/locale/lmonetary.c @@ -68,7 +68,7 @@ __monetary_load_locale(const char *name) { ret = __part_load_locale(name, &_monetary_using_locale, monetary_locale_buf, "LC_MONETARY", LCMONETARY_SIZE, (const char **)&_monetary_locale); - if (!ret) + if (!ret && _monetary_using_locale) _monetary_locale.mon_grouping = __fix_locale_grouping_str(_monetary_locale.mon_grouping); return ret; diff --git a/lib/libc/locale/lnumeric.c b/lib/libc/locale/lnumeric.c index 8754069..3fea4db 100644 --- a/lib/libc/locale/lnumeric.c +++ b/lib/libc/locale/lnumeric.c @@ -56,7 +56,7 @@ __numeric_load_locale(const char *name) { ret = __part_load_locale(name, &_numeric_using_locale, numeric_locale_buf, "LC_NUMERIC", LCNUMERIC_SIZE, (const char **)&_numeric_locale); - if (!ret) + if (!ret && _numeric_using_locale) _numeric_locale.grouping = __fix_locale_grouping_str(_numeric_locale.grouping); return ret; -- cgit v1.1