aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-03-13 09:28:27 +1100
committerNeil <nyamatongwe@gmail.com>2015-03-13 09:28:27 +1100
commit6eaae701a86c769a112c5d7d7d47eee388055dae (patch)
tree1725a94d71d5c8e44cfdf2fc785ac5b0ebe62745
parent7031894a988d9ccdca57a71f841f921a23408590 (diff)
downloadscintilla-mirror-6eaae701a86c769a112c5d7d7d47eee388055dae.tar.gz
Changed to symbolic constant.
-rw-r--r--win32/ScintillaWin.cxx6
1 files changed, 3 insertions, 3 deletions
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<wchar_t>(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<wchar_t>(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