X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e9863f4ea1ab957e59b421d36e6199c7b472476d..b97d1013cf34ee9e844fed490cca849c41bd4f8f:/src/common/textentrycmn.cpp diff --git a/src/common/textentrycmn.cpp b/src/common/textentrycmn.cpp index 5ec6850708..4adca176b0 100644 --- a/src/common/textentrycmn.cpp +++ b/src/common/textentrycmn.cpp @@ -41,10 +41,10 @@ wxString wxTextEntryBase::GetRange(long from, long to) const { wxString sel; wxString value = GetValue(); - - if ((from < to) && ((long)value.length() >= to + from)) + + if ( from < to && (long)value.length() >= to ) { - sel = GetValue().substr(from, to - from); + sel = value.substr(from, to - from); } return sel;