From 689bf0bcbc090ebc733216ebc9309706a67bb483 Mon Sep 17 00:00:00 2001 From: Nephrite Date: Tue, 29 Jul 2025 11:28:12 +0300 Subject: [PATCH] Fixed item swapping bug (#7428) (#7430) --- src/item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/item.c b/src/item.c index b25f38b058..4e7e514938 100644 --- a/src/item.c +++ b/src/item.c @@ -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);