git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71828
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Line end position shouldn't be the same as the end, or greater.
if (wrapPosition >= GetRange().GetEnd())
// Line end position shouldn't be the same as the end, or greater.
if (wrapPosition >= GetRange().GetEnd())
- wrapPosition = GetRange().GetEnd()-1;
+ wrapPosition = wxMax(0, GetRange().GetEnd()-1);
// wxLogDebug(wxT("Split at %ld"), wrapPosition);
// wxLogDebug(wxT("Split at %ld"), wrapPosition);