Unverified Commit 8f0a880c authored by Niels Lohmann's avatar Niels Lohmann Committed by GitHub

Merge pull request #2879 from nlohmann/issue2598

Avoid string in case of empty CBOR objects
parents fb1ee4f9 b7cc4708
......@@ -1082,6 +1082,8 @@ class binary_reader
return false;
}
if (len != 0)
{
string_t key;
if (len != std::size_t(-1))
{
......@@ -1116,6 +1118,7 @@ class binary_reader
key.clear();
}
}
}
return sax->end_object();
}
......
......@@ -9298,6 +9298,8 @@ class binary_reader
return false;
}
if (len != 0)
{
string_t key;
if (len != std::size_t(-1))
{
......@@ -9332,6 +9334,7 @@ class binary_reader
key.clear();
}
}
}
return sax->end_object();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment