mirror of
https://github.com/nlohmann/json.git
synced 2026-05-24 07:05:28 +00:00
Fix: update() parent pointers not updated after recursive merge with JSON_DIAGNOSTICS (#5187)
* added fix for issue 4813 Signed-off-by: VasuBhakt <cpswastik31@gmail.com> * added regression test for 4813 Signed-off-by: VasuBhakt <cpswastik31@gmail.com> * moved test from unit-regression2 to unit-diagnostics Signed-off-by: VasuBhakt <cpswastik31@gmail.com> --------- Signed-off-by: VasuBhakt <cpswastik31@gmail.com>
This commit is contained in:
@@ -3497,6 +3497,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
if (it2 != m_data.m_value.object->end())
|
||||
{
|
||||
it2->second.update(it.value(), true);
|
||||
#if JSON_DIAGNOSTICS
|
||||
it2->second.set_parents();
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user