aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-08 17:42:06 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-08 18:03:43 +0100
commit57d86cf57411225433c651cf50fe9e130cf407e3 (patch)
treee89d9491f980947a98fab13fe5edd899b559d267
parent969413b9fa5f1bbba9e6f238574869f1fe7f029e (diff)
downloadminetest-57d86cf57411225433c651cf50fe9e130cf407e3.tar.gz
minetest-57d86cf57411225433c651cf50fe9e130cf407e3.tar.bz2
minetest-57d86cf57411225433c651cf50fe9e130cf407e3.zip
Fix unitialized data when creating TOSERVER_INIT packet
-rw-r--r--src/client.cpp2
1 files changed, 2 insertions, 0 deletions
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());