Skip to content

Commit

Permalink
Merge Ensure root of JSON is an object (mr-366)
Browse files Browse the repository at this point in the history
- 4fff8ac tweak(nui/gsclient): ensure root is an object
  • Loading branch information
prikolium-cfx committed Jun 3, 2024
2 parents 9eedf88 + 4fff8ac commit b998343
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/components/nui-gsclient/src/ServerList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void RequestInfoBlob(const std::string& server, const TFunc& cb)
rapidjson::Document doc;
doc.Parse(data, length);

if (!doc.HasParseError())
if (!doc.HasParseError() && doc.IsObject())
{
auto member = doc.FindMember("version");

Expand Down Expand Up @@ -140,7 +140,7 @@ void LoadInfoBlob(const std::string& server, int expectedVersion, const TFunc& c
rapidjson::Document doc;
doc.Parse(blob.data(), blob.size());

if (!doc.HasParseError())
if (!doc.HasParseError() && doc.IsObject())
{
auto member = doc.FindMember("version");

Expand Down

0 comments on commit b998343

Please sign in to comment.