mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-25 15:39:09 +00:00
(svn r17772) -Fix [FS#3264]: CJK languages don't have spaces, so for adding newlines (multi line strings) we need to (properly) handle the case when there are no spaces instead of truncating the string.
This commit is contained in:
@@ -86,7 +86,7 @@ void CDECL NetworkAddChatMessage(TextColour colour, uint8 duration, const char *
|
||||
Utf8TrimString(buf, DRAW_STRING_BUFFER);
|
||||
|
||||
/* Force linebreaks for strings that are too long */
|
||||
lines = GB(FormatStringLinebreaks(buf, _chatmsg_box.width - 8), 0, 16) + 1;
|
||||
lines = GB(FormatStringLinebreaks(buf, lastof(buf), _chatmsg_box.width - 8), 0, 16) + 1;
|
||||
if (lines >= MAX_CHAT_MESSAGES) return;
|
||||
|
||||
msg_count = GetChatMessageCount();
|
||||
|
Reference in New Issue
Block a user