summaryrefslogtreecommitdiffstats
path: root/misc/json.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/json.c')
-rw-r--r--misc/json.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/misc/json.c b/misc/json.c
index 608cfad861..d30450c49d 100644
--- a/misc/json.c
+++ b/misc/json.c
@@ -255,6 +255,8 @@ static const char special_escape[] = {
static void write_json_str(bstr *b, unsigned char *str)
{
+ assert(str);
+
APPEND(b, "\"");
while (1) {
unsigned char *cur = str;