diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-10 15:15:37 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-10 15:15:37 +0100 |
commit | 03c60c1573cdbebbb662863cfc1780d19d511db5 (patch) | |
tree | 15d54d07bbb9de9a678b8f5beabc9ed042c5d680 /src/evalfunc.c | |
parent | f446b48ff0bffae2b453cd4f9e3c25dfe363d29d (diff) |
patch 8.0.0166: JSON with a duplicate key gives an internal errorv8.0.0166
Problem: JSON with a duplicate key gives an internal error. (Lcd)
Solution: Give a normal error. Avoid an error when parsing JSON from a
remote client fails.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index f66fa9a8e1..74676c2062 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -6818,8 +6818,7 @@ f_json_decode(typval_T *argvars, typval_T *rettv) reader.js_buf = get_tv_string(&argvars[0]); reader.js_fill = NULL; reader.js_used = 0; - if (json_decode_all(&reader, rettv, 0) != OK) - EMSG(_(e_invarg)); + json_decode_all(&reader, rettv, 0); } /* |