aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2010-12-14 20:09:25 +1100
committernyamatongwe <unknown>2010-12-14 20:09:25 +1100
commit69516bec75a009c6e589c9728b717607349db7fa (patch)
treef173683332ae52b7e48b81821b19cd86319e0b05
parent556ee24396ed972afe813cb35c2d93d49b6a3401 (diff)
downloadscintilla-mirror-69516bec75a009c6e589c9728b717607349db7fa.tar.gz
NUL terminate strings for characters typed. Helps receivers of SCN_MACRORECORD.
-rw-r--r--win32/ScintillaWin.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index fc4b336c7..faf2dfb61 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -811,6 +811,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
char inBufferCP[20];
int size = ::WideCharToMultiByte(cpDest,
0, wcs, 1, inBufferCP, sizeof(inBufferCP) - 1, 0, 0);
+ inBufferCP[size] = '\0';
AddCharUTF(inBufferCP, size);
}
} else {