Prevent index access error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4831,7 +4831,7 @@ bool wxRichTextParagraph::Layout(wxDC& dc, wxRichTextDrawingContext& context, co
|
||||
|
||||
// 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);
|
||||
|
||||
|
Reference in New Issue
Block a user