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.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/guichan/font.cpp b/src/guichan/font.cpp
index ea4652814..bb8006b95 100644
--- a/src/guichan/font.cpp
+++ b/src/guichan/font.cpp
@@ -56,7 +56,8 @@ namespace gcn
{
int Font::getStringIndexAt(const std::string& text, int x) const
{
- for (unsigned int i = 0, sz = text.size(); i < sz; ++i)
+ for (unsigned int i = 0, sz = static_cast<unsigned int>(text.size());
+ i < sz; ++i)
{
if (getWidth(text.substr(0, i)) > x)
return i;