diff src/misc1.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 6c318419e331
children 5c1aaf9b4b1b
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1932,7 +1932,7 @@ ins_char(c)
     int		c;
 {
 #if defined(FEAT_MBYTE) || defined(PROTO)
-    char_u	buf[MB_MAXBYTES];
+    char_u	buf[MB_MAXBYTES + 1];
     int		n;
 
     n = (*mb_char2bytes)(c, buf);