]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed off by one error in GetText
authorRobin Dunn <robin@alldunn.com>
Mon, 9 Jul 2001 18:28:47 +0000 (18:28 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 9 Jul 2001 18:28:47 +0000 (18:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/stc/gen_iface.py
contrib/src/stc/stc.cpp
src/stc/gen_iface.py
src/stc/stc.cpp

index 6798593426e25d97e7818f572a3a690b890aa3eb..293eff48c84ee7af49aba8959eec31b593eeb259 100644 (file)
@@ -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);
index 4fb35f564e5453c8711bf49d14af38f982199744..35655c34114507e1ececceaa5a046a2f9c967c08 100644 (file)
@@ -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);
index 6798593426e25d97e7818f572a3a690b890aa3eb..293eff48c84ee7af49aba8959eec31b593eeb259 100644 (file)
@@ -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);
index 4fb35f564e5453c8711bf49d14af38f982199744..35655c34114507e1ececceaa5a046a2f9c967c08 100644 (file)
@@ -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);