Commit f3ae2a919cde8070afab7ffb82b9e70ef97a10f0

henry 2004-09-29T23:55:24

Fixed infinite loop.

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;