Commit b5e09fe2 authored by matteoserva's avatar matteoserva

Update duelclient.cpp

buffer overflow fixed
parent f1fca420
......@@ -564,7 +564,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
else if(pkt->player == 3)
mainGame->AddChatMsg(msg, 3);
else
mainGame->AddChatMsg(msg, 10);
mainGame->AddChatMsg(msg, 9);
} else {
if(pkt->player == 0)
mainGame->AddChatMsg(msg, 1);
......@@ -575,7 +575,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
else if(pkt->player == 3)
mainGame->AddChatMsg(msg, 2);
else
mainGame->AddChatMsg(msg, 10);
mainGame->AddChatMsg(msg, 9);
}
}
mainGame->gMutex.Unlock();
......@@ -593,7 +593,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
BufferIO::CopyWStr(pkt->msg, msg, 256);
msg[(len - 3) / 2] = 0;
mainGame->gMutex.Lock();
mainGame->AddChatMsg(msg, 10);
mainGame->AddChatMsg(msg, 9);
mainGame->gMutex.Unlock();
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment