diff options
Diffstat (limited to 'json.c')
-rw-r--r-- | json.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -105,5 +105,8 @@ json_quote_chararray(const void *ctx, const char *str, const size_t len) char * json_quote_str(const void *ctx, const char *str) { + if (str == NULL) + str = ""; + return (json_quote_chararray (ctx, str, strlen (str))); } |