# HG changeset patch # User jbe # Date 1455389278 -3600 # Node ID 839ff2b8d9f8229e5335aea0590dbf65e5e5594c # Parent 66d7a0ac9c9dfbfa0364a9f3c2877a610dee7135 Bugfix for integer decoder in JSON library diff -r 66d7a0ac9c9d -r 839ff2b8d9f8 libraries/json/json.c --- a/libraries/json/json.c Tue Feb 09 20:09:34 2016 +0100 +++ b/libraries/json/json.c Sat Feb 13 19:47:58 2016 +0100 @@ -578,9 +578,13 @@ intval = 10 * intval + d; } } + // push result onto Lua stack: if (curpos == endpos) lua_pushinteger(L, intval); else lua_pushnumber(L, numval); } +#else + // push result onto Lua stack: + lua_pushnumber(L, numval); #endif // consume characters that were parsed: pos = endpos;