aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorMax Horn2008-11-05 14:47:06 +0000
committerMax Horn2008-11-05 14:47:06 +0000
commit4a23fd9170df17ecb5e754ae2c2eb05fab8b6477 (patch)
tree5d2102a22fc366f7b75da2d84708c401d18ed030 /graphics
parent27628688d2bab872adfbed40bf098381def586e6 (diff)
downloadscummvm-rg350-4a23fd9170df17ecb5e754ae2c2eb05fab8b6477.tar.gz
scummvm-rg350-4a23fd9170df17ecb5e754ae2c2eb05fab8b6477.tar.bz2
scummvm-rg350-4a23fd9170df17ecb5e754ae2c2eb05fab8b6477.zip
Fixed off-by-one error in horizontal text centering code
svn-id: r34903
Diffstat (limited to 'graphics')
-rw-r--r--graphics/font.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/font.cpp b/graphics/font.cpp
index 404e04d18e..3680ad2eb8 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -827,7 +827,7 @@ void Font::drawString(Surface *dst, const Common::String &s, int x, int y, int w
}
if (align == kTextAlignCenter)
- x = x + (w - width - 1)/2;
+ x = x + (w - width)/2;
else if (align == kTextAlignRight)
x = x + w - width;
x += deltax;