diff src/evalfunc.c @ 10553:f83b6a0b6148 v8.0.0166

patch 8.0.0166: JSON with a duplicate key gives an internal error commit https://github.com/vim/vim/commit/03c60c1573cdbebbb662863cfc1780d19d511db5 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 10 15:15:37 2017 +0100 patch 8.0.0166: JSON with a duplicate key gives an internal error 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.
author Christian Brabandt <cb@256bit.org>
date Tue, 10 Jan 2017 15:30:05 +0100
parents 7232cd9f8a7c
children fff45421182b
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -6818,8 +6818,7 @@ f_json_decode(typval_T *argvars, typval_
     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);
 }
 
 /*