From 6eaae701a86c769a112c5d7d7d47eee388055dae Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 13 Mar 2015 09:28:27 +1100 Subject: Changed to symbolic constant. --- win32/ScintillaWin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 131559542..715d26100 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1360,7 +1360,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam wchar_t wcs[2] = {static_cast(wParam), 0}; if (IsUnicodeMode()) { // For a wide character version of the window: - char utfval[4]; + char utfval[UTF8MaxBytes]; unsigned int len = UTF8Length(wcs, 1); UTF8FromUTF16(wcs, 1, utfval, len); AddCharUTF(utfval, len); @@ -1382,7 +1382,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam return 1; } else { if (IsUnicodeMode()) { - char utfval[4]; + char utfval[UTF8MaxBytes]; wchar_t wcs[2] = {static_cast(wParam), 0}; unsigned int len = UTF8Length(wcs, 1); UTF8FromUTF16(wcs, 1, utfval, len); @@ -2579,7 +2579,7 @@ void ScintillaWin::AddCharBytes(char b0, char b1) { int inputCodePage = InputCodePage(); if (inputCodePage && IsUnicodeMode()) { - char utfval[4] = "\0\0\0"; + char utfval[UTF8MaxBytes] = "\0\0\0"; char ansiChars[3]; wchar_t wcs[2]; if (b0) { // Two bytes from IME -- cgit v1.2.3