X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e14d10b039e68a701a447043a4031cf43e9fa90b..86351e4a9d12822b31f2052fe299fc6be6d5f44d:/src/stc/stc.cpp diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 274bce2f81..974bbab8d3 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -1121,7 +1121,7 @@ wxString wxStyledTextCtrl::GetSelectedText() { int len = end - start; if (!len) return wxEmptyString; - wxMemoryBuffer mbuf(len+1); + wxMemoryBuffer mbuf(len+2); char* buf = (char*)mbuf.GetWriteBuf(len+1); SendMsg(2161, 0, (long)buf); mbuf.UngetWriteBuf(len);