diff src/eval.c @ 3549:f52d2ea0f81c v7.3.535

updated for version 7.3.535 Problem: Many #ifdefs for MB_MAXBYTES. Solution: Also define MB_MAXBYTES without the +multi_byte feature. Fix places where the buffer didn't include space for a NUL byte.
author Bram Moolenaar <bram@vim.org>
date Fri, 01 Jun 2012 15:21:02 +0200
parents e4899d2ff5d8
children ce7bd50bafa7
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -19170,11 +19170,7 @@ get_vim_var_list(idx)
 set_vim_var_char(c)
     int c;
 {
-#ifdef FEAT_MBYTE
-    char_u	buf[MB_MAXBYTES];
-#else
-    char_u	buf[2];
-#endif
+    char_u	buf[MB_MAXBYTES + 1];
 
 #ifdef FEAT_MBYTE
     if (has_mbyte)