changeset 20517:7196aa7a4b81 draft

(svn r25477) -Fix: truncation didn't work because the string was truncated (or rather a newline was added) too early
author rubidium <rubidium@openttd.org>
date Wed, 26 Jun 2013 19:10:22 +0000
parents e4320a89f79b
children 3e37ced7e392
files src/gfx.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -523,7 +523,7 @@
  */
 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);