mirror of
https://github.com/nlohmann/json.git
synced 2026-03-28 11:52:52 +00:00
🐛 fix bug in diagnostics_t
This commit is contained in:
@@ -36,7 +36,7 @@ class diagnostics_t
|
||||
{
|
||||
for (std::size_t i = 0; i < current->m_parent->m_value.array->size(); ++i)
|
||||
{
|
||||
if (current->m_parent->m_value.array->operator[](i) == *current)
|
||||
if (¤t->m_parent->m_value.array->operator[](i) == current)
|
||||
{
|
||||
tokens.emplace_back(std::to_string(i));
|
||||
break;
|
||||
@@ -49,7 +49,7 @@ class diagnostics_t
|
||||
{
|
||||
for (const auto& element : *current->m_parent->m_value.object)
|
||||
{
|
||||
if (element.second == *current)
|
||||
if (&element.second == current)
|
||||
{
|
||||
tokens.emplace_back(element.first.c_str());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user