1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

fix #3825: Multiplayer crashes with UI buttons

Window was measuring number of lines of user's config server description rather than the connected server's description
This commit is contained in:
Ted John
2016-06-13 19:02:37 +01:00
parent 7a7813693c
commit 4b2f0b4119

View File

@@ -396,12 +396,13 @@ static rct_xy16 window_multiplayer_information_get_size()
int width = 450;
int height = 110;
char * buffer = gConfigNetwork.server_description;
int numLines, fontSpriteBase;
gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM;
int numLines, fontSpriteBase;
utf8 * buffer = _strdup(network_get_server_description());
gfx_wrap_string(buffer, width, &numLines, &fontSpriteBase);
free(buffer);
int lineHeight = font_get_line_height(fontSpriteBase);
height += (numLines + 1) * lineHeight;