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.
diff --git a/src/arabic.c b/src/arabic.c
index 8c1f64c..72c64b5 100644
--- a/src/arabic.c
+++ b/src/arabic.c
@@ -1066,7 +1066,7 @@
 
     if (curr_c != c && ccp != NULL)
     {
-	char_u buf[MB_MAXBYTES];
+	char_u buf[MB_MAXBYTES + 1];
 
 	/* Update the first byte of the character. */
 	(*mb_char2bytes)(curr_c, buf);
diff --git a/src/edit.c b/src/edit.c
index 39985bd..ebecdb6 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1648,11 +1648,7 @@
 #define PC_STATUS_RIGHT	1	/* right halve of double-wide char */
 #define PC_STATUS_LEFT	2	/* left halve of double-wide char */
 #define PC_STATUS_SET	3	/* pc_bytes was filled */
-#ifdef FEAT_MBYTE
 static char_u pc_bytes[MB_MAXBYTES + 1]; /* saved bytes */
-#else
-static char_u pc_bytes[2];		/* saved bytes */
-#endif
 static int  pc_attr;
 static int  pc_row;
 static int  pc_col;
@@ -6819,11 +6815,7 @@
     char_u	*s;
 
     vim_free(last_insert);
-#ifdef FEAT_MBYTE
     last_insert = alloc(MB_MAXBYTES * 3 + 5);
-#else
-    last_insert = alloc(6);
-#endif
     if (last_insert != NULL)
     {
 	s = last_insert;
@@ -6861,7 +6853,7 @@
     char_u	*s;
 {
 #ifdef FEAT_MBYTE
-    char_u	temp[MB_MAXBYTES];
+    char_u	temp[MB_MAXBYTES + 1];
     int		i;
     int		len;
 
@@ -7423,7 +7415,7 @@
     int		cc;
 {
     int		n;
-    char_u	buf[MB_MAXBYTES];
+    char_u	buf[MB_MAXBYTES + 1];
     int		i;
     int		c;
 
@@ -10109,11 +10101,7 @@
     int c;
 {
     char_u	*res;
-#ifdef FEAT_MBYTE
     char_u	buf[MB_MAXBYTES + 1];
-#else
-    char_u	buf[2];
-#endif
 
     /* Return quickly when there is nothing to do. */
     if (!has_insertcharpre())
diff --git a/src/eval.c b/src/eval.c
index 07cb87f..2dd36b0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -19170,11 +19170,7 @@
 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)
diff --git a/src/getchar.c b/src/getchar.c
index 606d9a2..aea8d10 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -723,7 +723,7 @@
     int				c;
 #ifdef FEAT_MBYTE
     int				n;
-    char_u			buf[MB_MAXBYTES];
+    char_u			buf[MB_MAXBYTES + 1];
     int				i;
 #endif
 
@@ -1072,7 +1072,7 @@
     int	    c;
 {
 #ifdef FEAT_MBYTE
-    char_u	buf[MB_MAXBYTES];
+    char_u	buf[MB_MAXBYTES + 1];
 #else
     char_u	buf[4];
 #endif
@@ -1547,7 +1547,7 @@
     int		c, c2;
 #ifdef FEAT_MBYTE
     int		n;
-    char_u	buf[MB_MAXBYTES];
+    char_u	buf[MB_MAXBYTES + 1];
     int		i;
 #endif
 
@@ -4335,11 +4335,7 @@
     int		scol;		/* starting column of the abbr. */
     int		j;
     char_u	*s;
-#ifdef FEAT_MBYTE
     char_u	tb[MB_MAXBYTES + 4];
-#else
-    char_u	tb[4];
-#endif
     mapblock_T	*mp;
 #ifdef FEAT_LOCALMAP
     mapblock_T	*mp2;
diff --git a/src/mbyte.c b/src/mbyte.c
index 75b41ea..2394401 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -708,7 +708,7 @@
 	     */
 	    n = (i & 0x80) ? 2 : 1;
 # else
-	    char buf[MB_MAXBYTES];
+	    char buf[MB_MAXBYTES + 1];
 # ifdef X_LOCALE
 #  ifndef mblen
 #   define mblen _Xmblen
@@ -1953,7 +1953,7 @@
 /*
  * Convert the character at screen position "off" to a sequence of bytes.
  * Includes the composing characters.
- * "buf" must at least have the length MB_MAXBYTES.
+ * "buf" must at least have the length MB_MAXBYTES + 1.
  * Only to be used when ScreenLinesUC[off] != 0.
  * Returns the produced number of bytes.
  */
diff --git a/src/misc1.c b/src/misc1.c
index b30b077..8588411 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1932,7 +1932,7 @@
     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);
diff --git a/src/screen.c b/src/screen.c
index fd74707..e5a5b19 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -6621,16 +6621,17 @@
     int	    row, col;
     int	    attr;
 {
-#ifdef FEAT_MBYTE
     char_u	buf[MB_MAXBYTES + 1];
 
-    buf[(*mb_char2bytes)(c, buf)] = NUL;
-#else
-    char_u	buf[2];
-
-    buf[0] = c;
-    buf[1] = NUL;
+#ifdef FEAT_MBYTE
+    if (has_mbyte)
+	buf[(*mb_char2bytes)(c, buf)] = NUL;
+    else
 #endif
+    {
+	buf[0] = c;
+	buf[1] = NUL;
+    }
     screen_puts(buf, row, col, attr);
 }
 
diff --git a/src/spell.c b/src/spell.c
index 2ab31c9..f109967 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -13694,7 +13694,7 @@
 {
     int		m1, m2;
 #ifdef FEAT_MBYTE
-    char_u	buf[MB_MAXBYTES];
+    char_u	buf[MB_MAXBYTES + 1];
     hashitem_T  *hi;
 
     if (c1 >= 256)
diff --git a/src/version.c b/src/version.c
index 9dd4001..773d5b0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    535,
+/**/
     534,
 /**/
     533,
diff --git a/src/vim.h b/src/vim.h
index 5cd5e30..d63551d 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1703,6 +1703,8 @@
  * character of up to 6 bytes, or one 16-bit character of up to three bytes
  * plus six following composing characters of three bytes each. */
 # define MB_MAXBYTES	21
+#else
+# define MB_MAXBYTES	1
 #endif
 
 #if (defined(FEAT_PROFILE) || defined(FEAT_RELTIME)) && !defined(PROTO)
@@ -2017,6 +2019,7 @@
  #pragma warning(disable : 4312)
 #endif
 
+/* Note: a NULL argument for vim_realloc() is not portable, don't use it. */
 #if defined(MEM_PROFILE)
 # define vim_realloc(ptr, size)  mem_realloc((ptr), (size))
 #else