From 51cf464f7450ee31e3a986b521f90cc6195bb2fb Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 2 Jun 2011 00:01:11 +0300 Subject: Fixed the password crash on Windows --- src/client.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 79bbd8021..e494056f2 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -306,8 +306,14 @@ void Client::step(float dtime) SharedBuffer data(2+1+PLAYERNAME_SIZE+PASSWORD_SIZE); writeU16(&data[0], TOSERVER_INIT); writeU8(&data[2], SER_FMT_VER_HIGHEST); + memset((char*)&data[3], 0, PLAYERNAME_SIZE); snprintf((char*)&data[3], PLAYERNAME_SIZE, "%s", myplayer->getName()); + + /*dstream<<"Client: password hash is \""<