mirror of
https://github.com/zoriya/vim.git
synced 2025-12-19 05:35:17 +00:00
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.
This commit is contained in:
@@ -14100,9 +14100,9 @@ f_jsondecode(typval_T *argvars, typval_T *rettv)
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user