From 19d2f1589850d7db1ce77efec052929246f156e2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 1 Feb 2016 21:38:19 +0100 Subject: patch 7.4.1231 Problem: JSON messages are not parsed properly. Solution: Queue received messages. --- src/json.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/json.c') diff --git a/src/json.c b/src/json.c index a56104217..9c78e15e8 100644 --- a/src/json.c +++ b/src/json.c @@ -549,14 +549,16 @@ json_decode_item(js_read_T *reader, typval_T *res) /* * Decode the JSON from "reader" and store the result in "res". + * Return OK or FAIL; */ - void + int json_decode(js_read_T *reader, typval_T *res) { json_skip_white(reader); json_decode_item(reader, res); json_skip_white(reader); if (reader->js_buf[reader->js_used] != NUL) - EMSG(_(e_invarg)); + return FAIL; + return OK; } #endif -- cgit v1.2.3