From 7e3a908120dcc31ca9869b857a93ed744f3c4de6 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Sun, 6 Jan 2013 21:44:23 +0100 Subject: [PATCH] Fixed error - WmudPlayer was initialized with g_new0() instead of constructor --- wmud/game-networking.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wmud/game-networking.c b/wmud/game-networking.c index fcdff50..686b55d 100644 --- a/wmud/game-networking.c +++ b/wmud/game-networking.c @@ -413,7 +413,8 @@ state_fresh(WmudClient *client) wmud_client_send(client, "Please provide us your password: %c%c%c", TELNET_IAC, TELNET_WILL, TELNET_ECHO); } } else { - WmudPlayer *player = g_new0(WmudPlayer, 1); + WmudPlayer *player = wmud_player_new(); + wmud_player_set_player_name(player, wmud_client_get_buffer(client)->str); wmud_client_set_player(client, player); wmud_client_set_state(client, WMUD_CLIENT_STATE_YESNO);