summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-21 19:31:47 +0000
committerrubidium <rubidium@openttd.org>2009-03-21 19:31:47 +0000
commit93fe44a3c561e357313af0f8332a697b46812474 (patch)
tree815d6455f0947e44d67f175b86832b1932c3e96b /src/gfx.cpp
parent8a758beec30dcf3c43d69d5adafbac59f296b9f1 (diff)
downloadopenttd-93fe44a3c561e357313af0f8332a697b46812474.tar.xz
(svn r15783) -Codechange: make the dropdown draw code pass around the left/right instead of the x and width to make drawing text at offsets easier.
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 670f591e1..ee6c33d0a 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -342,7 +342,7 @@ static int TruncateString(char *str, int maxw)
if (IsPrintable(c)) {
w += GetCharacterWidth(size, c);
- if (w >= maxw) {
+ if (w > maxw) {
/* string got too big... insert dotdotdot, but make sure we do not
* print anything beyond the string termination character. */
for (int i = 0; *ddd_pos != '\0' && i < 3; i++, ddd_pos++) *ddd_pos = '.';