mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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.
This commit is contained in:
@@ -708,7 +708,7 @@ codepage_invalid:
|
||||
*/
|
||||
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 @@ utfc_ptr2char_len(p, pcc, maxlen)
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user