mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 13:37:22 +00:00
Merge pull request #504 from NinjaOfLU/fix-item-removal-underflow
Prevent integer underflow in item removal
This commit is contained in:
commit
c489132f59
@ -5433,6 +5433,8 @@ void GameMessages::HandleRemoveItemFromInventory(RakNet::BitStream* inStream, En
|
||||
return;
|
||||
}
|
||||
|
||||
iStackCount = std::min<uint32_t>(item->GetCount(), iStackCount);
|
||||
|
||||
if (bConfirmed) {
|
||||
for (auto i = 0; i < iStackCount; ++i) {
|
||||
if (eInvType == eInventoryType::MODELS)
|
||||
|
Loading…
Reference in New Issue
Block a user