aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/json.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/json.c b/src/json.c
index 5849705952d..82f670a163e 100644
--- a/src/json.c
+++ b/src/json.c
@@ -376,8 +376,7 @@ lisp_to_json (Lisp_Object lisp)
376 else if (STRINGP (lisp)) 376 else if (STRINGP (lisp))
377 { 377 {
378 Lisp_Object encoded = json_encode (lisp); 378 Lisp_Object encoded = json_encode (lisp);
379 ptrdiff_t size = SBYTES (encoded); 379 return json_check (json_stringn (SSDATA (encoded), SBYTES (encoded)));
380 return json_check (json_stringn (SSDATA (encoded), size));
381 } 380 }
382 381
383 /* LISP now must be a vector or hashtable. */ 382 /* LISP now must be a vector or hashtable. */