X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e14d10b039e68a701a447043a4031cf43e9fa90b..9a33ef7c3cc827658ba12b553c40af432f10bc3b:/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);