diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-06-01 15:21:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-06-01 15:21:02 +0200 |
commit | 9a920d8c31bc4d267d8790ba0d83b5774316e08f (patch) | |
tree | 9e3efd2be89a848c17b76251486cf14da09c7e9b /src/getchar.c | |
parent | 704984ac87979fd20b8ba732df3abd3197814f7f (diff) | |
download | vim-git-9a920d8c31bc4d267d8790ba0d83b5774316e08f.tar.gz |
updated for version 7.3.535v7.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.
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/getchar.c b/src/getchar.c index 606d9a2c6..aea8d10da 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -723,7 +723,7 @@ read_redo(init, old_redo) 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 @@ ins_char_typebuf(c) 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 @@ vgetc() 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 @@ check_abbr(c, ptr, col, mincol) 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; |