From 57d86cf57411225433c651cf50fe9e130cf407e3 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sun, 8 Mar 2015 17:42:06 +0100 Subject: [PATCH] Fix unitialized data when creating TOSERVER_INIT packet --- src/client.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client.cpp b/src/client.cpp index edf244452..ba6835f51 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -401,6 +401,8 @@ void Client::step(float dtime) char pName[PLAYERNAME_SIZE]; char pPassword[PASSWORD_SIZE]; + bzero(pName, PLAYERNAME_SIZE); + bzero(pPassword, PLAYERNAME_SIZE); snprintf(pName, PLAYERNAME_SIZE, "%s", myplayer->getName()); snprintf(pPassword, PASSWORD_SIZE, "%s", m_password.c_str());