Skip to content

Commit

Permalink
fixed exception when text contained two (or more) line feeds (closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimaryFeather committed May 14, 2012
1 parent 5ef44f6 commit 24f355b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sparrow/src/Classes/SPBitmapFont.m
Expand Up @@ -258,6 +258,7 @@ - (SPDisplayObject *)createDisplayObjectWithWidth:(float)width height:(float)hei
{
for (SPSprite *line in lineContainer)
{
if (line.numChildren == 0) continue;
SPDisplayObject *lastChar = [line childAtIndex:line.numChildren-1];
float lineWidth = lastChar.x + lastChar.width;
float widthDiff = containerWidth - lineWidth;
Expand Down

0 comments on commit 24f355b

Please sign in to comment.