From befb332a6b3fe92e44ff99c78dfe769f8c662464 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Thu, 20 Mar 2003 08:05:20 +0000 Subject: [PATCH] decimal_point can't be "" according to C99, so set it to standard "." in that case. --- lib/libc/locale/lnumeric.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libc/locale/lnumeric.c b/lib/libc/locale/lnumeric.c index b1b975e3a926..77d2bfa1fc72 100644 --- a/lib/libc/locale/lnumeric.c +++ b/lib/libc/locale/lnumeric.c @@ -59,9 +59,14 @@ __numeric_load_locale(const char *name) (const char **)&_numeric_locale); if (ret != _LDP_ERROR) __nlocale_changed = 1; - if (ret == _LDP_LOADED) + if (ret == _LDP_LOADED) { + /* Can't be empty according to C99 */ + if (*_numeric_locale.decimal_point == '\0') + _numeric_locale.decimal_point = + _C_numeric_locale.decimal_point; _numeric_locale.grouping = __fix_locale_grouping_str(_numeric_locale.grouping); + } return (ret); }