diff --git a/src/json.hpp b/src/json.hpp index 09b6a800..c514015a 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -10007,11 +10007,11 @@ basic_json_parser_63: { // add operations in reverse order to avoid invalid // indices - result.insert(result.begin() + end_index, + result.insert(result.begin() + end_index, object( { {"op", "remove"}, {"path", path + "/" + std::to_string(i)} - }); + })); ++i; } diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index c5de9246..86d90114 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -9317,11 +9317,11 @@ class basic_json { // add operations in reverse order to avoid invalid // indices - result.insert(result.begin() + end_index, + result.insert(result.begin() + end_index, object( { {"op", "remove"}, {"path", path + "/" + std::to_string(i)} - }); + })); ++i; }