diff options
Diffstat (limited to 'sprinter-json.c')
-rw-r--r-- | sprinter-json.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sprinter-json.c b/sprinter-json.c index c9b68353..0a077907 100644 --- a/sprinter-json.c +++ b/sprinter-json.c @@ -118,6 +118,8 @@ json_string_len (struct sprinter *sp, const char *val, size_t len) static void json_string (struct sprinter *sp, const char *val) { + if (val == NULL) + val = ""; json_string_len (sp, val, strlen (val)); } |