summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-04 10:59:14 +0000
committerrubidium <rubidium@openttd.org>2009-04-04 10:59:14 +0000
commit171f98d52374008fc35c9dcc9808444884f30b6b (patch)
tree9dc30e6e5668dc2b966656c3aef3b1faac8d8c84
parentbdf05e797da37e5474cefc80c2c0819beb3f5699 (diff)
downloadopenttd-171f98d52374008fc35c9dcc9808444884f30b6b.tar.xz
(svn r15953) -Fix [FS#2783]: left - right != width causing strings to be truncated too early
-rw-r--r--src/gfx.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 4880ffd08..48f559ce0 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -403,7 +403,7 @@ static int DrawString(int left, int right, int top, char *str, const char *last,
int initial_right = right;
int initial_top = top;
- if (truncate) TruncateString(str, right - left);
+ if (truncate) TruncateString(str, right - left + 1);
/*
* To support SETX and SETXY properly with RTL languages we have to