Skip to content
Snippets Groups Projects
Commit ec5ad98a authored by Eric M. Tulla (BigPapi)'s avatar Eric M. Tulla (BigPapi)
Browse files

EXT-4848 - Crash when trying to view chicklet(?). Bug in word wrap logic.

Added a clamp to >= 0 for num pixels so we don't hit the assert.
-Reviewed by Nyx
parent c339017d
No related branches found
No related tags found
No related merge requests found
...@@ -2512,7 +2512,7 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin ...@@ -2512,7 +2512,7 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
LLUIImagePtr image = mStyle->getImage(); LLUIImagePtr image = mStyle->getImage();
if( image.notNull()) if( image.notNull())
{ {
num_pixels -= image->getWidth(); num_pixels = llmax(0, num_pixels - image->getWidth());
} }
// search for newline and if found, truncate there // search for newline and if found, truncate there
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment