projects
/
tools
/
apitrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa5681e
)
Handle null strings in json writer.
author
José Fonseca
<jose.r.fonseca@gmail.com>
Tue, 11 Oct 2011 18:33:02 +0000
(19:33 +0100)
committer
José Fonseca
<jose.r.fonseca@gmail.com>
Tue, 11 Oct 2011 19:29:34 +0000
(20:29 +0100)
common/json.hpp
patch
|
blob
|
history
diff --git
a/common/json.hpp
b/common/json.hpp
index
9e6b960
..
621610a
100644
(file)
--- a/
common/json.hpp
+++ b/
common/json.hpp
@@
-270,6
+270,11
@@
public:
}
inline void writeString(const char *s) {
+ if (!s) {
+ writeNull();
+ return;
+ }
+
separator();
escapeUnicodeString(s);
value = true;