🐛 fix leak for strings

This commit is contained in:
Niels Lohmann committed 2021-07-15 13:12:21 +02:00
1 parent 0f8666ecdc
commit 0011cd1b72
2 files changed
+2 -2

No files matched your search

@@ -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);
} }
+1 -1
View File
@@ -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);
} }