U8toU16 now respects buffer sizes

This commit is contained in:
2020-10-04 12:50:58 -05:00
parent 5015e2575d
commit 755bb75306
6 changed files with 11 additions and 8 deletions

View File

@@ -135,7 +135,7 @@ void CNLoginServer::handlePacket(CNSocket* sock, CNPacketData* data) {
}
} else {
INITSTRUCT(sP_LS2CL_REP_LOGIN_FAIL, resp);
U8toU16(userLogin, resp.szID);
U8toU16(userLogin, resp.szID, sizeof(resp.szID));
resp.iErrorCode = errorCode;
sock->sendPacket((void*)&resp, P_LS2CL_REP_LOGIN_FAIL, sizeof(sP_LS2CL_REP_LOGIN_FAIL));
}