From: Ryan Flegel Date: Fri, 8 Oct 2004 17:45:07 +0000 (+0000) Subject: - fixed blackscreen on amd64 (and likely other 64bit archs), thanks to bug X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ce77ac2dc07853488c61e430f7fa6fa25a91f3e3;p=supertux.git - fixed blackscreen on amd64 (and likely other 64bit archs), thanks to bug hunting done by cibomahto SVN-Revision: 1997 --- diff --git a/lib/video/font.cpp b/lib/video/font.cpp index 95d60f79b..260c6f753 100644 --- a/lib/video/font.cpp +++ b/lib/video/font.cpp @@ -74,12 +74,12 @@ float Font::get_text_width(const std::string& text) const { /** Let's calculate the size of the biggest paragraph */ - int l, hl; + std::string::size_type l, hl; hl = 0; l = -1; while(true) { l = text.find("\n", l+1); - if(l == (int)std::string::npos) + if(l == std::string::npos) break; if(hl < l) hl = l; @@ -94,7 +94,7 @@ float Font::get_text_height(const std::string& text) const { /** Let's calculate height of the text */ - int l, hh; + std::string::size_type l, hh; hh = h; l = -1; while(true) { @@ -128,7 +128,8 @@ Font::draw(const std::string& text, const Vector& pos_, int allignment, Uint32 d Feel free to replace this hack with a more elegant solution */ char temp[1024]; - unsigned int i, l, y; + std::string::size_type l; + unsigned int i, y; i = y = 0; while(true)