mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
fix(Core/Packets): Fix a crash in MSG_RANDOM_ROLL. (#14545)
This commit is contained in:
@@ -567,6 +567,12 @@ void WorldSession::HandleRandomRollOpcode(WorldPackets::Misc::RandomRollClient&
|
||||
minimum = packet.Min;
|
||||
maximum = packet.Max;
|
||||
|
||||
/** error handling **/
|
||||
if (minimum > maximum || maximum > 10000) // < 32768 for urand call
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GetPlayer()->DoRandomRoll(minimum, maximum);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user