added sanity check to exitGame()

This commit is contained in:
CPunch 2020-08-22 13:08:37 -05:00
parent 56bf0db20d
commit cd9fb6ec25
2 changed files with 4 additions and 0 deletions

View File

@ -86,6 +86,7 @@ void NanoManager::nanoSkillUseHandler(CNSocket* sock, CNPacketData* data) {
resp->iNanoStamina = 150; // Hardcoded for now
sock->sendPacket(new CNPacketData((void*)resp, P_FE2CL_NANO_SKILL_USE_SUCC, sizeof(sP_FE2CL_NANO_SKILL_USE_SUCC), sock->getFEKey()));
DEBUGLOG(
std::cout << U16toU8(plr.plr.PCStyle.szFirstName) << U16toU8(plr.plr.PCStyle.szLastName) << " requested to summon nano skill " << std::endl;
)

View File

@ -553,6 +553,9 @@ void PlayerManager::heartbeatPlayer(CNSocket* sock, CNPacketData* data) {
}
void PlayerManager::exitGame(CNSocket* sock, CNPacketData* data) {
if (data->size != sizeof(sP_CL2FE_REQ_PC_EXIT))
return;
sP_CL2FE_REQ_PC_EXIT* exitData = (sP_CL2FE_REQ_PC_EXIT*)data->buf;
sP_FE2CL_REP_PC_EXIT_SUCC* response = (sP_FE2CL_REP_PC_EXIT_SUCC*)xmalloc(sizeof(sP_FE2CL_REP_PC_EXIT_SUCC));