X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c7dcb7fd20b96a9ef8059a45a4bafc146644b44..8f974c520a8733158591891458fda10fae4c3950:/src/stc/stc.cpp diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 35655c3411..bed2b4ed46 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -319,7 +319,7 @@ void wxStyledTextCtrl::SetAnchor(int posAnchor) { wxString wxStyledTextCtrl::GetCurLine(int* linePos) { wxString text; int len = LineLength(GetCurrentLine()); - char* buf = text.GetWriteBuf(len+1); + char* buf = text.GetWriteBuf(len); int pos = SendMsg(2027, len, (long)buf); text.UngetWriteBuf(); @@ -921,7 +921,7 @@ int wxStyledTextCtrl::GetFirstVisibleLine() { wxString wxStyledTextCtrl::GetLine(int line) { wxString text; int len = LineLength(line); - char* buf = text.GetWriteBuf(len+1); + char* buf = text.GetWriteBuf(len); int pos = SendMsg(2153, line, (long)buf); text.UngetWriteBuf();