webmcp

changeset 441:839ff2b8d9f8

Bugfix for integer decoder in JSON library
author jbe
date Sat Feb 13 19:47:58 2016 +0100 (2016-02-13)
parents 66d7a0ac9c9d
children 2131f02763fe
files libraries/json/json.c
line diff
     1.1 --- a/libraries/json/json.c	Tue Feb 09 20:09:34 2016 +0100
     1.2 +++ b/libraries/json/json.c	Sat Feb 13 19:47:58 2016 +0100
     1.3 @@ -578,9 +578,13 @@
     1.4            intval = 10 * intval + d;
     1.5          }
     1.6        }
     1.7 +      // push result onto Lua stack:
     1.8        if (curpos == endpos) lua_pushinteger(L, intval);
     1.9        else lua_pushnumber(L, numval);
    1.10      }
    1.11 +#else
    1.12 +    // push result onto Lua stack:
    1.13 +    lua_pushnumber(L, numval);
    1.14  #endif
    1.15      // consume characters that were parsed:
    1.16      pos = endpos;

Impressum / About Us