Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f222404

Browse files
committed
Fixed crash when changing text in really, really, ridiculously thin looking MultiLineEditbox
1 parent 965c831 commit f222404

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vendor/cegui-0.4.0-custom/src/elements/CEGUIMultiLineEditbox.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,10 @@ void MultiLineEditbox::formatText(void)
712712
{
713713
// get point at which to break the token
714714
lineLen = fnt->getCharAtPixel(paraText.substr(lineIndex, nextTokenSize), areaWidth);
715+
716+
// If not enough room, pretend there is (to prevent infinite loop)
717+
if ( lineLen == 0 )
718+
lineLen = 1;
715719
}
716720

717721
// text wraps, exit loop early with line info up until wrap point

0 commit comments

Comments
 (0)