mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-11 08:52:27 +00:00
[Crash] Fix crash issue with dropping items and order of operations (#2939)
Should wait to null out invalid_drop until after it is used in log message.
This commit is contained in:
parent
2ae795fd61
commit
4a64048744
@ -848,13 +848,14 @@ void Client::DropItem(int16 slot_id, bool recurse)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
invalid_drop = nullptr;
|
|
||||||
|
|
||||||
std::string message = fmt::format(
|
std::string message = fmt::format(
|
||||||
"Tried to drop an item on the ground that was no-drop! item_name [{}] item_id ({})",
|
"Tried to drop an item on the ground that was no-drop! item_name [{}] item_id ({})",
|
||||||
invalid_drop->GetItem()->Name,
|
invalid_drop->GetItem()->Name,
|
||||||
invalid_drop->GetItem()->ID
|
invalid_drop->GetItem()->ID
|
||||||
);
|
);
|
||||||
|
|
||||||
|
invalid_drop = nullptr;
|
||||||
RecordPlayerEventLog(PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = message});
|
RecordPlayerEventLog(PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = message});
|
||||||
GetInv().DeleteItem(slot_id);
|
GetInv().DeleteItem(slot_id);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user