From 0c7dcb7fd20b96a9ef8059a45a4bafc146644b44 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 9 Jul 2001 18:28:47 +0000 Subject: [PATCH] fixed off by one error in GetText git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/stc/gen_iface.py | 2 +- contrib/src/stc/stc.cpp | 2 +- src/stc/gen_iface.py | 2 +- src/stc/stc.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/src/stc/gen_iface.py b/contrib/src/stc/gen_iface.py index 6798593426..293eff48c8 100644 --- a/contrib/src/stc/gen_iface.py +++ b/contrib/src/stc/gen_iface.py @@ -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); 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); diff --git a/src/stc/gen_iface.py b/src/stc/gen_iface.py index 6798593426..293eff48c8 100644 --- a/src/stc/gen_iface.py +++ b/src/stc/gen_iface.py @@ -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); diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 4fb35f564e..35655c3411 100644 --- a/src/stc/stc.cpp +++ b/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); -- 2.45.2