From: Daniel Karbach Date: Fri, 10 Aug 2012 12:55:10 +0000 (+0200) Subject: fixed positioning in Font when number is 0 X-Git-Url: http://git.localhorst.tv/?a=commitdiff_plain;h=fb10fbd4a72793048916557308772fdaa2afebc2;hp=4356621a6440ac915dd0d2dfc70d2c17c3ff321a;p=l2e.git fixed positioning in Font when number is 0 --- diff --git a/src/graphics/Font.cpp b/src/graphics/Font.cpp index 135775c..d3a3de0 100644 --- a/src/graphics/Font.cpp +++ b/src/graphics/Font.cpp @@ -47,7 +47,7 @@ void Font::DrawNumber(int numberIn, SDL_Surface *dest, Point 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; }