1
0
镜像自地址 https://github.com/luanti-org/luanti.git 已同步 2025-11-06 02:05:30 +01:00

Fix parsing JSON with large integers (#9674)

这个提交包含在:
sfan5
2020-04-15 08:01:28 +02:00
提交者 GitHub
父节点 5c588f89e7
当前提交 8ae8c1600a

查看文件

@@ -1671,10 +1671,10 @@ static bool push_json_value_helper(lua_State *L, const Json::Value &value,
lua_pushvalue(L, nullindex);
break;
case Json::intValue:
lua_pushinteger(L, value.asInt());
lua_pushinteger(L, value.asLargestInt());
break;
case Json::uintValue:
lua_pushinteger(L, value.asUInt());
lua_pushinteger(L, value.asLargestUInt());
break;
case Json::realValue:
lua_pushnumber(L, value.asDouble());
@@ -1700,7 +1700,7 @@ static bool push_json_value_helper(lua_State *L, const Json::Value &value,
lua_createtable(L, 0, value.size());
for (Json::Value::const_iterator it = value.begin();
it != value.end(); ++it) {
#ifndef JSONCPP_STRING
#if !defined(JSONCPP_STRING) && (JSONCPP_VERSION_MAJOR < 1 || JSONCPP_VERSION_MINOR < 9)
const char *str = it.memberName();
lua_pushstring(L, str ? str : "");
#else