Mercurial > vim
comparison src/arabic.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 | 3fc0f57ecb91 |
children | af3c41a3c53f |
comparison
equal
deleted
inserted
replaced
3548:7a6efa56f306 | 3549:f52d2ea0f81c |
---|---|
1064 if (curr_c == NUL) | 1064 if (curr_c == NUL) |
1065 curr_c = c; | 1065 curr_c = c; |
1066 | 1066 |
1067 if (curr_c != c && ccp != NULL) | 1067 if (curr_c != c && ccp != NULL) |
1068 { | 1068 { |
1069 char_u buf[MB_MAXBYTES]; | 1069 char_u buf[MB_MAXBYTES + 1]; |
1070 | 1070 |
1071 /* Update the first byte of the character. */ | 1071 /* Update the first byte of the character. */ |
1072 (*mb_char2bytes)(curr_c, buf); | 1072 (*mb_char2bytes)(curr_c, buf); |
1073 *ccp = buf[0]; | 1073 *ccp = buf[0]; |
1074 } | 1074 } |