From e303ea8a19bcd385eb7829beb7f2ef691c064b35 Mon Sep 17 00:00:00 2001 From: ZyX Date: Fri, 5 Feb 2016 02:29:10 +0300 Subject: eval/decode: Add support for special maps Special dictionaries representing map are created when encountering duplicate key or when key is empty or contains NUL. Also checks that values are separated by a comma/colon properly. --- src/nvim/eval/encode.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval/encode.c') diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c index 5c843357f2..0fc975ed42 100644 --- a/src/nvim/eval/encode.c +++ b/src/nvim/eval/encode.c @@ -897,6 +897,7 @@ static inline int convert_to_json_string(garray_T *const gap, size_t len_ = len; char *tofree = NULL; if (last_p_enc != (const void *) p_enc) { + p_enc_conv.vc_type = CONV_NONE; convert_setup(&p_enc_conv, p_enc, "utf-8"); p_enc_conv.vc_fail = true; last_p_enc = p_enc; -- cgit