summaryrefslogtreecommitdiff
path: root/src/json.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-01 21:38:19 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-01 21:38:19 +0100
commit19d2f1589850d7db1ce77efec052929246f156e2 (patch)
treebe47c6956bd31ba45624e931806243090194b22f /src/json.c
parentca568aeec60dd6cc13b4dcf5cec0e0a07113547f (diff)
downloadvim-19d2f1589850d7db1ce77efec052929246f156e2.zip
patch 7.4.1231
Problem: JSON messages are not parsed properly. Solution: Queue received messages.
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c6
1 files changed, 4 insertions, 2 deletions
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