diff options
author | peterbell10 <peterbell10@live.co.uk> | 2020-05-09 16:51:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-09 16:51:15 +0200 |
commit | e6634ed26c50e99f6ccd285235fe477cb4168b06 (patch) | |
tree | b533a69db545835a886bcd8c5b05609b4c830d11 /src/Bindings | |
parent | Upgrade to C++17 [CI] (#4716) (diff) | |
download | cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar.gz cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar.bz2 cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar.lz cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar.xz cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.tar.zst cuberite-e6634ed26c50e99f6ccd285235fe477cb4168b06.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/Bindings/LuaJson.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt index 76a912d2b..f5896f02d 100644 --- a/src/Bindings/CMakeLists.txt +++ b/src/Bindings/CMakeLists.txt @@ -169,5 +169,5 @@ endif() if(NOT MSVC) add_library(Bindings ${SRCS} ${HDRS}) - target_link_libraries(Bindings fmt::fmt lua sqlite tolualib mbedtls HTTPServer) + target_link_libraries(Bindings fmt::fmt lua lsqlite tolualib mbedtls HTTPServer SQLiteCpp) endif() diff --git a/src/Bindings/LuaJson.cpp b/src/Bindings/LuaJson.cpp index ef042d44d..1cd88cf96 100644 --- a/src/Bindings/LuaJson.cpp +++ b/src/Bindings/LuaJson.cpp @@ -9,6 +9,7 @@ #include "LuaState.h" #include "tolua++/include/tolua++.h" #include "json/json.h" +#include "../JsonUtils.h" @@ -295,10 +296,10 @@ static int tolua_cJson_Parse(lua_State * a_LuaState) // Parse the string: Json::Value root; - Json::Reader reader; - if (!reader.parse(input, root, false)) + AString ParseError; + if (!JsonUtils::ParseString(input, root, &ParseError)) { - L.Push(cLuaState::Nil, Printf("Parsing Json failed: %s", reader.getFormattedErrorMessages().c_str())); + L.Push(cLuaState::Nil, Printf("Parsing Json failed: %s", ParseError)); return 2; } |