Fix unitialized data when creating TOSERVER_INIT packet

This commit is contained in:
Loic Blot 2015-03-08 17:42:06 +01:00
parent 969413b9fa
commit 57d86cf574
1 changed files with 2 additions and 0 deletions

View File

@ -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());