]> git.saurik.com Git - wxWidgets.git/commitdiff
A couple off-by-one fixes
authorRobin Dunn <robin@alldunn.com>
Sat, 28 Jul 2001 02:57:53 +0000 (02:57 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 28 Jul 2001 02:57:53 +0000 (02:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11197 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 293eff48c84ee7af49aba8959eec31b593eeb259..be86c9ce0e873a5a4d3b15a045c5b3331e5c43a9 100644 (file)
@@ -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();
index 35655c34114507e1ececceaa5a046a2f9c967c08..bed2b4ed4699d3dad9979b2fd27f127a20dfbc3e 100644 (file)
@@ -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();
index 293eff48c84ee7af49aba8959eec31b593eeb259..be86c9ce0e873a5a4d3b15a045c5b3331e5c43a9 100644 (file)
@@ -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();
index 35655c34114507e1ececceaa5a046a2f9c967c08..bed2b4ed4699d3dad9979b2fd27f127a20dfbc3e 100644 (file)
@@ -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();