diff options
author | ache <ache@FreeBSD.org> | 2003-03-20 08:05:20 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2003-03-20 08:05:20 +0000 |
commit | 2876ad7e0d3e45afd229e5be1f9ef78c7ece309e (patch) | |
tree | 4149f501179228cd234484d898fffcd3d002f9ad /lib/libc/locale/lnumeric.c | |
parent | 9ca1a9adcb708665d9f4210c0bcffc17468e51f7 (diff) | |
download | FreeBSD-src-2876ad7e0d3e45afd229e5be1f9ef78c7ece309e.zip FreeBSD-src-2876ad7e0d3e45afd229e5be1f9ef78c7ece309e.tar.gz |
decimal_point can't be "" according to C99, so set it to standard "."
in that case.
Diffstat (limited to 'lib/libc/locale/lnumeric.c')
-rw-r--r-- | lib/libc/locale/lnumeric.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libc/locale/lnumeric.c b/lib/libc/locale/lnumeric.c index b1b975e..77d2bfa 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); } |