mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-26 15:37:20 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iStackCount = std::min<uint32_t>(item->GetCount(), iStackCount);
|
||||||
|
|
||||||
if (bConfirmed) {
|
if (bConfirmed) {
|
||||||
for (auto i = 0; i < iStackCount; ++i) {
|
for (auto i = 0; i < iStackCount; ++i) {
|
||||||
if (eInvType == eInventoryType::MODELS)
|
if (eInvType == eInventoryType::MODELS)
|
||||||
|
Loading…
Reference in New Issue
Block a user