X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ceb1196bb688d56bbceca98c615fa7b9222ba1d..9fe52545f5b4a21e3cdeab5d0aa8d9e6a91355c3:/contrib/src/stc/stc.cpp diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index 4fb35f564e..35655c3411 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -1077,7 +1077,7 @@ void wxStyledTextCtrl::SetText(const wxString& text) { // Retrieve all the text in the document. wxString wxStyledTextCtrl::GetText() { wxString text; - int len = GetTextLength(); + int len = GetTextLength()+1; char* buff = text.GetWriteBuf(len+1); SendMsg(2182, len, (long)buff);