mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-09-20 07:40:08 +00:00
added sanity check for missionId
This commit is contained in:
parent
ced837a528
commit
76fa7b154b
@ -332,6 +332,12 @@ void MissionManager::mobKilled(CNSocket *sock, int mobid) {
|
||||
}
|
||||
|
||||
void MissionManager::saveMission(Player* player, int missionId) {
|
||||
//sanity check missionID so we don't get exceptions
|
||||
if (missionId < 0 || missionId>1023) {
|
||||
std::cout << "[WARN] Client submitted invalid missionId: " <<missionId<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
// Missions are stored in int_64t array
|
||||
int row = missionId / 64;
|
||||
int column = missionId % 64;
|
||||
|
Loading…
x
Reference in New Issue
Block a user