diff options
author | EladNLG <e1lad8955@gmail.com> | 2023-04-19 02:28:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-18 19:28:07 -0400 |
commit | 4e341f156b05fafbaed9584bff8aecd2f2d54f15 (patch) | |
tree | 6126bf2cb21aedec7b6778de960f15451a7b1c5d | |
parent | ca45fcc4c541e90fbcd5dc9a3dc0abf06af54dbc (diff) | |
download | NorthstarLauncher-4e341f156b05fafbaed9584bff8aecd2f2d54f15.tar.gz NorthstarLauncher-4e341f156b05fafbaed9584bff8aecd2f2d54f15.zip |
Fix DecodeJSON fatalParseErrors param (#443)
Previously, DecodeJSON would log a warning and swallow the error silently, even if the second argument (fatalParseErrors) was true (default is false).
-rw-r--r-- | NorthstarDLL/scripts/scriptjson.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/NorthstarDLL/scripts/scriptjson.cpp b/NorthstarDLL/scripts/scriptjson.cpp index 98cb52d6..06bda6f4 100644 --- a/NorthstarDLL/scripts/scriptjson.cpp +++ b/NorthstarDLL/scripts/scriptjson.cpp @@ -212,10 +212,12 @@ ADD_SQFUNC( doc.GetErrorOffset()); if (bFatalParseErrors) + { g_pSquirrel<context>->raiseerror(sqvm, sErrorString.c_str()); - else - spdlog::warn(sErrorString); + return SQRESULT_ERROR; + } + spdlog::warn(sErrorString); return SQRESULT_NOTNULL; } |