summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-06-26 19:10:22 +0000
committerrubidium <rubidium@openttd.org>2013-06-26 19:10:22 +0000
commit809120bc05124847a0e33e069bbe0c09b995866e (patch)
tree7a8901d4458a4bbf28059f90f0440fb5edd07260 /src/gfx.cpp
parenteb7962a72e8ddd18a97ba1fbdb5a4a4a3d286076 (diff)
downloadopenttd-809120bc05124847a0e33e069bbe0c09b995866e.tar.xz
(svn r25477) -Fix: truncation didn't work because the string was truncated (or rather a newline was added) too early
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 b42275da6..da8215fec 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -523,7 +523,7 @@ static int DrawLayoutLine(ParagraphLayout::Line *line, int y, int left, int righ
*/
int DrawString(int left, int right, int top, const char *str, TextColour colour, StringAlignment align, bool underline, FontSize fontsize)
{
- Layouter layout(str, right - left + 1, colour, fontsize);
+ Layouter layout(str, INT32_MAX, colour, fontsize);
if (layout.Length() == 0) return 0;
return DrawLayoutLine(*layout.Begin(), top, left, right, align, underline);