Skip to content
Snippets Groups Projects
Commit 3ae16f1c authored by Loïc Blot's avatar Loïc Blot
Browse files

Fix memleak pointed by issue #2439.

Also change bzero to memset. bzero doesn't work on windows
parent 57d86cf5
No related branches found
No related tags found
No related merge requests found
......@@ -401,8 +401,8 @@ void Client::step(float dtime)
char pName[PLAYERNAME_SIZE];
char pPassword[PASSWORD_SIZE];
bzero(pName, PLAYERNAME_SIZE);
bzero(pPassword, PLAYERNAME_SIZE);
memset(pName, 0, PLAYERNAME_SIZE * sizeof(char));
memset(pPassword, 0, PASSWORD_SIZE * sizeof(char));
snprintf(pName, PLAYERNAME_SIZE, "%s", myplayer->getName());
snprintf(pPassword, PASSWORD_SIZE, "%s", m_password.c_str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment