mirror of
https://github.com/nlohmann/json.git
synced 2025-07-29 23:01:16 +03:00
🐛 fix leak for strings
This commit is contained in:
@ -238,7 +238,7 @@ void to_json(BasicJsonType& j, const CompatibleString& s)
|
|||||||
{
|
{
|
||||||
if (!j.is_null())
|
if (!j.is_null())
|
||||||
{
|
{
|
||||||
j = nullptr;
|
j = BasicJsonType();
|
||||||
}
|
}
|
||||||
external_constructor<value_t::string>::construct(j, s);
|
external_constructor<value_t::string>::construct(j, s);
|
||||||
}
|
}
|
||||||
|
@ -4696,7 +4696,7 @@ void to_json(BasicJsonType& j, const CompatibleString& s)
|
|||||||
{
|
{
|
||||||
if (!j.is_null())
|
if (!j.is_null())
|
||||||
{
|
{
|
||||||
j = nullptr;
|
j = BasicJsonType();
|
||||||
}
|
}
|
||||||
external_constructor<value_t::string>::construct(j, s);
|
external_constructor<value_t::string>::construct(j, s);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user