summaryrefslogtreecommitdiff
path: root/libs/libjson
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-02-24 18:04:30 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-02-24 18:04:30 +0300
commit53c26b123b267420707d9d337c4a2d3f32c8be81 (patch)
tree6503a81f6a21244bd8203f9014f51762894d9e3d /libs/libjson
parent7b32f314110ff2cdb2d2ddade8e7b8ff9e5b51fb (diff)
Discord: temporary token not to be saved
Diffstat (limited to 'libs/libjson')
-rw-r--r--libs/libjson/src/stdafx.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/libjson/src/stdafx.cxx b/libs/libjson/src/stdafx.cxx
index bc7c7777a3..d4f920a7c3 100644
--- a/libs/libjson/src/stdafx.cxx
+++ b/libs/libjson/src/stdafx.cxx
@@ -40,7 +40,11 @@ LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const BOOL_PARAM &param)
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const CHAR_PARAM &param)
{
- json.push_back(JSONNode(param.szName, param.szValue));
+ if (param.szValue == nullptr) {
+ JSONNode tmp(JSON_NULL); tmp.set_name(param.szName);
+ json.push_back(tmp);
+ }
+ else json.push_back(JSONNode(param.szName, param.szValue));
return json;
}