X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0f1fbeb81044f54fbf5b1c2cbfd9152da1862e90..a14670e28e06377ece094ab6561cf8022420963f:/src/richtext/richtextbuffer.cpp diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index bbdebd1b79..4b78f06808 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -3921,9 +3921,11 @@ bool wxRichTextParagraph::FindWrapPosition(const wxRichTextRange& range, wxDC& d else { int spacePos = plainText.Find(wxT(' '), true); - if (spacePos != wxNOT_FOUND) + int tabPos = plainText.Find(wxT('\t'), true); + int pos = wxMax(spacePos, tabPos); + if (pos != wxNOT_FOUND) { - int positionsFromEndOfString = plainText.length() - spacePos - 1; + int positionsFromEndOfString = plainText.length() - pos - 1; breakPosition = breakPosition - positionsFromEndOfString; } } @@ -8199,8 +8201,8 @@ bool wxRichTextImageBlock::ReadHex(wxInputStream& stream, int length, int imageT int i; for (i = 0; i < dataSize; i ++) { - str[0] = stream.GetC(); - str[1] = stream.GetC(); + str[0] = (char)stream.GetC(); + str[1] = (char)stream.GetC(); m_data[i] = (unsigned char)wxHexToDec(str); }