From ea345f90f5d2e9cb8a63ad12343aeea49e67340c Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 31 Aug 2022 23:05:06 -0300 Subject: [PATCH] Picked the correct pointers for correctness' sake --- src/item.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/item.c b/src/item.c index 641c1ce618..0f5746027b 100644 --- a/src/item.c +++ b/src/item.c @@ -792,8 +792,8 @@ bool8 AddPyramidBagItem(u16 itemId, u16 count) if (count == 0) { - memcpy(items, newItems, PYRAMID_BAG_ITEMS_COUNT * sizeof(*newItems)); - memcpy(quantities, newQuantities, PYRAMID_BAG_ITEMS_COUNT * sizeof(*newQuantities)); + memcpy(items, newItems, PYRAMID_BAG_ITEMS_COUNT * sizeof(*items)); + memcpy(quantities, newQuantities, PYRAMID_BAG_ITEMS_COUNT * sizeof(*quantities)); Free(newItems); Free(newQuantities); return TRUE; @@ -854,8 +854,8 @@ bool8 RemovePyramidBagItem(u16 itemId, u16 count) if (count == 0) { - memcpy(items, newItems, PYRAMID_BAG_ITEMS_COUNT * sizeof(*newItems)); - memcpy(quantities, newQuantities, PYRAMID_BAG_ITEMS_COUNT * sizeof(*newQuantities)); + memcpy(items, newItems, PYRAMID_BAG_ITEMS_COUNT * sizeof(*items)); + memcpy(quantities, newQuantities, PYRAMID_BAG_ITEMS_COUNT * sizeof(*quantities)); Free(newItems); Free(newQuantities); return TRUE;