From 453df705675869123675ba399f08e92ca658aa2f Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 12 May 2003 14:03:26 +0000 Subject: merge changes from 4.1 --- Src/math.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src/math.c') diff --git a/Src/math.c b/Src/math.c index 6e3fce777..2bf65d117 100644 --- a/Src/math.c +++ b/Src/math.c @@ -398,12 +398,12 @@ zzlex(void) /* it's a float */ yyval.type = MN_FLOAT; #ifdef USE_LOCALE - prev_locale = setlocale(LC_NUMERIC, NULL); + prev_locale = dupstring(setlocale(LC_NUMERIC, NULL)); setlocale(LC_NUMERIC, "POSIX"); #endif yyval.u.d = strtod(ptr, &nptr); #ifdef USE_LOCALE - setlocale(LC_NUMERIC, prev_locale); + if (prev_locale) setlocale(LC_NUMERIC, prev_locale); #endif if (ptr == nptr || *nptr == '.') { zerr("bad floating point constant", NULL, 0); -- cgit 1.4.1