aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-12-14 20:09:25 +1100
committernyamatongwe <devnull@localhost>2010-12-14 20:09:25 +1100
commit71f92a5b584f80e8da3ce5f2816859af83c887c7 (patch)
tree50323fe40d5d80741d85b9366aa007e5b7c8d42e
parent1e03c3b80c7543fa94e9d9da55a618e848089feb (diff)
downloadscintilla-mirror-71f92a5b584f80e8da3ce5f2816859af83c887c7.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 {