summaryrefslogtreecommitdiff
path: root/src/guichan/font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guichan/font.cpp')
-rw-r--r--src/guichan/font.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/guichan/font.cpp b/src/guichan/font.cpp
index 6fec94121..ea4652814 100644
--- a/src/guichan/font.cpp
+++ b/src/guichan/font.cpp
@@ -56,7 +56,7 @@ namespace gcn
{
int Font::getStringIndexAt(const std::string& text, int x) const
{
- for (unsigned int i = 0; i < text.size(); ++i)
+ for (unsigned int i = 0, sz = text.size(); i < sz; ++i)
{
if (getWidth(text.substr(0, i)) > x)
return i;