Commit 403c633b authored by philip's avatar philip Committed by Nathaniel Wesley Filardo
Browse files

Make it work for the integer lua51 build

parent 85298b34
...@@ -726,7 +726,7 @@ static void encode_lua_object(lua_State *L, ENC_DATA *data, int argno, const cha ...@@ -726,7 +726,7 @@ static void encode_lua_object(lua_State *L, ENC_DATA *data, int argno, const cha
#if LUA_VERSION_NUM == 501 #if LUA_VERSION_NUM == 501
#ifdef LUA_NUMBER_INTEGRAL #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 #else
snprintf(value, sizeof(value), SJSON_FLOAT_FMT, lua_tonumber(L, -1)); snprintf(value, sizeof(value), SJSON_FLOAT_FMT, lua_tonumber(L, -1));
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment