Skip to content

Commit 6908588

Browse files
jetrotalGhabry
authored andcommitted
Process Json: Fix writing of keys
Compile fix for old nlohmann version
1 parent b59c0ad commit 6908588

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/game_interpreter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5464,7 +5464,7 @@ bool Game_Interpreter::CommandEasyRpgProcessJson(lcf::rpg::EventCommand const& c
54645464
}
54655465
std::string json_str = "[" + keys_str + "]";
54665466
if (create_keys_obj) {
5467-
json_str = fmt::format(R"({ \"keys\": {} })", json_str);
5467+
json_str = fmt::format(R"({ "keys": {} })", json_str);
54685468
}
54695469
set_var_value(target_var_type, target_var_id, json_str);
54705470
break;

src/json_helper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ namespace Json_Helper {
206206
json_path.remove_prefix(parent_ptr.to_string().size() + 1);
207207

208208
if (parent.is_object()) {
209-
parent.erase(json_path);
209+
parent.erase(std::string(json_path));
210210
}
211211
else if (parent.is_array()) {
212212
// Check if key is a valid positive number

0 commit comments

Comments
 (0)