From 09a575a20fd47c506f1cb4d0365f8cff2904fcba Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Wed, 16 May 2007 12:54:30 +0000 Subject: MFH: fix #41403 (json_decode cannot decode floats if localeconv decimal_point is not '.') --- ext/json/JSON_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/json/JSON_parser.c') diff --git a/ext/json/JSON_parser.c b/ext/json/JSON_parser.c index b57d65174e..ae8e7522e0 100644 --- a/ext/json/JSON_parser.c +++ b/ext/json/JSON_parser.c @@ -288,7 +288,7 @@ static void json_create_zval(zval **z, smart_str *buf, int type) } else if (type == IS_DOUBLE) { - ZVAL_DOUBLE(*z, atof(buf->c)); + ZVAL_DOUBLE(*z, zend_strtod(buf->c, NULL)); } else if (type == IS_STRING) { -- cgit v1.2.1