patch 7.4.1238
Problem: Can't handle two messages right after each other.
Solution: Find the end of the JSON. Read more when incomplete. Add a C
test for the JSON decoding.
diff --git a/src/eval.c b/src/eval.c
index 01a4512..9a4e1bb 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -14100,9 +14100,9 @@
js_read_T reader;
reader.js_buf = get_tv_string(&argvars[0]);
- reader.js_eof = TRUE;
+ reader.js_fill = NULL;
reader.js_used = 0;
- if (json_decode(&reader, rettv) == FAIL)
+ if (json_decode_all(&reader, rettv) != OK)
EMSG(_(e_invarg));
}