X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/37d6243357b65ce2a2fa7a35b848ebefb88a3912..2d2c394b59407ca3780a92a28ab12f63489c9cb1:/src/stc/gen_iface.py diff --git a/src/stc/gen_iface.py b/src/stc/gen_iface.py index 6798593426..be86c9ce0e 100644 --- a/src/stc/gen_iface.py +++ b/src/stc/gen_iface.py @@ -112,7 +112,7 @@ methodOverrideMap = { '''wxString %s(int* linePos) { wxString text; int len = LineLength(GetCurrentLine()); - char* buf = text.GetWriteBuf(len+1); + char* buf = text.GetWriteBuf(len); int pos = SendMsg(%s, len, (long)buf); text.UngetWriteBuf(); @@ -280,7 +280,7 @@ methodOverrideMap = { '''wxString %s(int line) { wxString text; int len = LineLength(line); - char* buf = text.GetWriteBuf(len+1); + char* buf = text.GetWriteBuf(len); int pos = SendMsg(%s, line, (long)buf); text.UngetWriteBuf(); @@ -338,7 +338,7 @@ methodOverrideMap = { '''wxString %s() { wxString text; - int len = GetTextLength(); + int len = GetTextLength()+1; char* buff = text.GetWriteBuf(len+1); SendMsg(%s, len, (long)buff);