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:
Julian Smart
2012-06-21 19:12:04 +00:00
parent 59c9dd5c61
commit a8a15de623

View File

@@ -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);