Merge pull request #1 from NinjaOfLU/fix-item-removal-underflow

Fix item removal underflow
This commit is contained in:
Aaron Kimbrell 2022-04-19 11:56:57 -05:00 committed by GitHub
commit c845055e6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)