Browse Source

Merge pull request #374 from greenfire27/TextSpriteZeroSizeBug

TextSprite Zero Size Bug
Peter Robinson 9 years ago
parent
commit
740b95c6cd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      engine/source/2d/sceneobject/TextSprite.cc

+ 1 - 1
engine/source/2d/sceneobject/TextSprite.cc

@@ -645,7 +645,7 @@ void TextSprite::CalculateSpatials(F32 ratio)
             wordEndLength = length - getCursorAdvance(bmChar, prevCharID, ratio);
             wordEndLength = length - getCursorAdvance(bmChar, prevCharID, ratio);
          }
          }
 
 
-         if (length > mSize.x && wordEnd > start)
+         if (length > mSize.x && wordEnd > start && start != -1)
          {
          {
             mLine.back().mEnd = wordEnd;
             mLine.back().mEnd = wordEnd;
             U32 endCharID = mText.getChar(wordEnd);
             U32 endCharID = mText.getChar(wordEnd);