summaryrefslogtreecommitdiffstats
path: root/src/json.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-28 22:46:58 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-28 22:46:58 +0100
commitfa06a517b5d5e37f40ab7c884bd334f089988fac (patch)
treebb2ebd5961a55c2d39f684f23c13bbc8e9f7a125 /src/json.c
parent298b440930ecece38d6ea0505a3e582dc817e79b (diff)
patch 7.4.1192v7.4.1192
Problem: Can't build with FEAT_EVAL but without FEAT_MBYTE. (John Marriott) Solution: Add #ifdef for FEAT_MBYTE.
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c
index d6507c3517..7256a8ceda 100644
--- a/src/json.c
+++ b/src/json.c
@@ -68,7 +68,12 @@ write_string(garray_T *gap, char_u *str)
default:
if (c >= 0x20)
{
+#ifdef FEAT_MBYTE
numbuf[mb_char2bytes(c, numbuf)] = NUL;
+#else
+ numbuf[0] = c;
+ numbuf[1] = NUL;
+#endif
ga_concat(gap, numbuf);
}
else