mirror of
https://github.com/nodemcu/nodemcu-firmware.git
synced 2025-01-16 20:52:57 +08:00
Make it work for the integer lua51 build
This commit is contained in:
parent
85298b34c5
commit
403c633b25
@ -726,7 +726,7 @@ static void encode_lua_object(lua_State *L, ENC_DATA *data, int argno, const cha
|
||||
|
||||
#if LUA_VERSION_NUM == 501
|
||||
#ifdef LUA_NUMBER_INTEGRAL
|
||||
snprintf(value, sizeof(value), LUA_INTEGER_FMT, lua_tointeger(L, -1));
|
||||
snprintf(value, sizeof(value), "%d", lua_tointeger(L, -1));
|
||||
#else
|
||||
snprintf(value, sizeof(value), SJSON_FLOAT_FMT, lua_tonumber(L, -1));
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user