Fixed infinite loop.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index 80aab52..eb29fc8 100755
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -149,8 +149,8 @@ void FTFont::BBox( const char* string,
tempBBox.Move( FTPoint( advance, 0.0f, 0.0f));
totalBBox += tempBBox;
advance += glyphList->Advance( *c, *(c + 1));
- ++c;
}
+ ++c;
}
}
}
@@ -187,8 +187,8 @@ void FTFont::BBox( const wchar_t* string,
tempBBox.Move( FTPoint( advance, 0.0f, 0.0f));
totalBBox += tempBBox;
advance += glyphList->Advance( *c, *(c + 1));
- ++c;
}
+ ++c;
}
}
}
@@ -212,8 +212,8 @@ float FTFont::Advance( const wchar_t* string)
if(CheckGlyph( *c))
{
width += glyphList->Advance( *c, *(c + 1));
- ++c;
}
+ ++c;
}
return width;
@@ -230,8 +230,8 @@ float FTFont::Advance( const char* string)
if(CheckGlyph( *c))
{
width += glyphList->Advance( *c, *(c + 1));
- ++c;
}
+ ++c;
}
return width;