diff options
author | Hop311 <hop3114@gmail.com> | 2023-05-25 23:35:16 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-05-25 23:35:16 +0200 |
commit | 9843807154aa70324c84692ce9d3b54414e2b5e0 (patch) | |
tree | 31d37e00cf6c010180fb3212b45ac5f70728cc8f /extension/src | |
parent | b493547fb8c77918306fe56b74b704284cf54931 (diff) |
Added compatibility-mode command line argument
Diffstat (limited to 'extension/src')
-rw-r--r-- | extension/src/LoadGameOpenVic.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/extension/src/LoadGameOpenVic.cpp b/extension/src/LoadGameOpenVic.cpp index ce1bf39..27fb265 100644 --- a/extension/src/LoadGameOpenVic.cpp +++ b/extension/src/LoadGameOpenVic.cpp @@ -19,14 +19,15 @@ static Error _load_json_file(String const& file_description, String const& file_ return err == OK ? FAILED : err; } const String json_string = file->get_as_text(); - JSON json; - err = json.parse(json_string); + Ref<JSON> json; + json.instantiate(); + err = json->parse(json_string); if (err != OK) { UtilityFunctions::push_error("Failed to parse ", file_description, " file as JSON: ", file_path, - "\nError at line ", json.get_error_line(), ": ", json.get_error_message()); + "\nError at line ", json->get_error_line(), ": ", json->get_error_message()); return err; } - result = json.get_data(); + result = json->get_data(); return err; } |