diff --git a/src/Client/Screens.c b/src/Client/Screens.c index d53fd2c85..a4c072fa3 100644 --- a/src/Client/Screens.c +++ b/src/Client/Screens.c @@ -1520,7 +1520,7 @@ bool DisconnectScreen_HandlesMouseDown(GuiElement* elem, Int32 x, Int32 y, Mouse if (!widget->Disabled && Widget_Contains((Widget*)widget, x, y)) { UInt8 connectBuffer[String_BufferSize(STRING_SIZE)]; - String connect = String_FromConst(connectBuffer); + String connect = String_InitAndClearArray(connectBuffer); String empty = String_MakeNull(); String_Format2(&connect, "Connecting to %s: %i..", &Game_IPAddress, &Game_Port); diff --git a/src/Client/ServerConnection.c b/src/Client/ServerConnection.c index 43ca2c89a..6d553955e 100644 --- a/src/Client/ServerConnection.c +++ b/src/Client/ServerConnection.c @@ -492,7 +492,7 @@ void ServerConnection_InitMultiplayer(void) { void MPConnection_OnNewMap(void) { - if (!ServerConnection_IsSinglePlayer) return; + if (ServerConnection_IsSinglePlayer) return; /* wipe all existing entity states */ Int32 i; for (i = 0; i < ENTITIES_MAX_COUNT; i++) { @@ -501,7 +501,7 @@ void MPConnection_OnNewMap(void) { } void MPConnection_Reset(void) { - if (!ServerConnection_IsSinglePlayer) return; + if (ServerConnection_IsSinglePlayer) return; Int32 i; for (i = 0; i < OPCODE_COUNT; i++) { Net_Handlers[i] = NULL;