]> git.localhorst.tv Git - l2e.git/commitdiff
fixed positioning in Font when number is 0
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 10 Aug 2012 12:55:10 +0000 (14:55 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 10 Aug 2012 12:55:10 +0000 (14:55 +0200)
src/graphics/Font.cpp

index 135775c1412061224b1e9434acc2d7f19245e80c..d3a3de06d5396677ace4b5007aa79475a9995976 100644 (file)
@@ -47,7 +47,7 @@ void Font::DrawNumber(int numberIn, SDL_Surface *dest, Point<int> positionIn, in
 
        if (digits > 0) {
                int i(digits - 1);
-               while (number < pow(10.0, i)) {
+               while (number < pow(10.0, i) && i > 0) {
                        position += step;
                        --i;
                }