summaryrefslogtreecommitdiff
path: root/engine/items/inventory.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/items/inventory.asm')
-rw-r--r--engine/items/inventory.asm5
1 files changed, 3 insertions, 2 deletions
diff --git a/engine/items/inventory.asm b/engine/items/inventory.asm
index ec1cfd0f..e28edc6c 100644
--- a/engine/items/inventory.asm
+++ b/engine/items/inventory.asm
@@ -34,6 +34,7 @@ AddItemToInventory_::
cp b ; does the current item in the table match the item being added?
jp z, .increaseItemQuantity ; if so, increase the item's quantity
inc hl
+.addAnotherStackOfItem
ld a, [hl]
cp $ff ; is it the end of the table?
jr nz, .notAtEndOfInventory
@@ -73,7 +74,7 @@ AddItemToInventory_::
; if so, store 99 in the current slot and store the rest in a new slot
ld a, 99
ld [hli], a
- jp .notAtEndOfInventory
+ jp .addAnotherStackOfItem
.increaseItemQuantityFailed
pop hl
and a
@@ -101,7 +102,7 @@ RemoveItemFromInventory_::
push hl
inc hl
ld a, [wWhichPokemon] ; index (within the inventory) of the item being removed
- sla a
+ add a
add l
ld l, a
jr nc, .noCarry