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:
parent
82dfea7723
commit
afc2b641d3
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user