A couple off-by-one fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2001-07-28 02:57:53 +00:00
parent 82dfea7723
commit afc2b641d3
4 changed files with 8 additions and 8 deletions

View 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();

View 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();

View 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();

View 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();