Fix crash when sorting out_of_range columns

Fix crash while sorting the right part of equal sign with column-selection:

100/20 = 5

1/3    = 0.333

22/7   = 3.14285714286

Note that empty lines between the numbers are intentional.

Fix #5865, fix #3391, close #3771
This commit is contained in:
AngryGamer 2019-07-02 03:32:50 -07:00 committed by Don HO
parent 8449d9f5ea
commit 6c034985a2
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -48,6 +48,12 @@ protected:
{
if (isSortingSpecificColumns())
{
// prevent an std::out_of_range exception
if (input.length() < _fromColumn)
{
return TEXT("");
}
return input.substr(_fromColumn, 1 + _toColumn - _fromColumn);
}
else