Make it work for the integer lua51 build

This commit is contained in:
philip 2020-09-22 21:44:52 -04:00 committed by Nathaniel Wesley Filardo
parent 85298b34c5
commit 403c633b25
1 changed files with 1 additions and 1 deletions

View File

@ -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