From 3197cda157fc8200a678bb46cd82d9ca0e3a6362 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 26 Oct 2021 10:30:04 -0400 Subject: [PATCH] Fix macOS crash parsing wild encounters --- src/project.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/project.cpp b/src/project.cpp index 16c8ca90..074eef4c 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -1740,7 +1740,8 @@ bool Project::readWildMonData() { OrderedJson::object subObject = subObjectRef.object_items(); if (!subObject["for_maps"].bool_value()) { QString err; - OrderedJson::object orderedSubObject = OrderedJson::parse(OrderedJson(subObject).dump(), err).object_items(); + QString subObjson = OrderedJson(subObject).dump(); + OrderedJson::object orderedSubObject = OrderedJson::parse(subObjson, err).object_items(); extraEncounterGroups.push_back(orderedSubObject); if (!err.isEmpty()) { logWarn(QString("Encountered a problem while parsing extra encounter groups: %1").arg(err));