mirror of https://github.com/OpenTTD/OpenTTD
(svn r25477) -Fix: truncation didn't work because the string was truncated (or rather a newline was added) too early
parent
eb7962a72e
commit
809120bc05
|
@ -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)
|
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;
|
if (layout.Length() == 0) return 0;
|
||||||
|
|
||||||
return DrawLayoutLine(*layout.Begin(), top, left, right, align, underline);
|
return DrawLayoutLine(*layout.Begin(), top, left, right, align, underline);
|
||||||
|
|
Loading…
Reference in New Issue