🐛 fix leak for strings

parent 0f8666ec
...@@ -238,7 +238,7 @@ void to_json(BasicJsonType& j, const CompatibleString& s) ...@@ -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) ...@@ -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);
} }
......
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