Skip to content

Commit

Permalink
Fix parsing JSON with large integers (#9674)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Apr 15, 2020
1 parent 5c588f8 commit 8ae8c16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/script/common/c_content.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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
Expand Down

0 comments on commit 8ae8c16

Please sign in to comment.