Fixed item swapping bug (#7428) (#7430)

This commit is contained in:
Nephrite 2025-07-29 11:28:12 +03:00 committed by GitHub
parent 1fbee7cce0
commit 689bf0bcbc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -567,7 +567,7 @@ static inline void NONNULL BagPocket_MoveItemSlot(struct BagPocket *pocket, u32
BagPocket_GetSlotData(pocket, from, &fromItemId, &fromQuantity);
// Shuffle items between "to" and "from"
for (u32 i = from; i == to - shift; i += shift)
for (u32 i = from; i != to; i += shift)
{
BagPocket_GetSlotData(pocket, i + shift, &tempItemId, &tempQuantity);
BagPocket_SetSlotData(pocket, i, &tempItemId, &tempQuantity);