Skip to content

Commit

Permalink
fix create_keys_obj
Browse files Browse the repository at this point in the history
Update json_helper.cpp
  • Loading branch information
jetrotal committed Feb 24, 2025
1 parent b59c0ad commit 81f1b88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5464,7 +5464,7 @@ bool Game_Interpreter::CommandEasyRpgProcessJson(lcf::rpg::EventCommand const& c
}
std::string json_str = "[" + keys_str + "]";
if (create_keys_obj) {
json_str = fmt::format(R"({ \"keys\": {} })", json_str);
json_str = "{ \"keys\": "+ json_str + " }";
}
set_var_value(target_var_type, target_var_id, json_str);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/json_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ namespace Json_Helper {
json_path.remove_prefix(parent_ptr.to_string().size() + 1);

if (parent.is_object()) {
parent.erase(json_path);
parent.erase(std::string(json_path));
}
else if (parent.is_array()) {
// Check if key is a valid positive number
Expand Down

0 comments on commit 81f1b88

Please sign in to comment.