fix index checking in GetRange()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -42,9 +42,9 @@ wxString wxTextEntryBase::GetRange(long from, long to) const
|
|||||||
wxString sel;
|
wxString sel;
|
||||||
wxString value = GetValue();
|
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;
|
return sel;
|
||||||
|
Reference in New Issue
Block a user