diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 3890928e4..3582d1f32 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -16,8 +16,6 @@ // between 2 Pokémon with held items #define MAX_ITEM_ICONS 3 -#define MAX_MENU_ITEMS 7 - enum { MODE_PARTY, @@ -308,7 +306,7 @@ struct PokemonStorageSystemData /* 0c66 */ u8 iconScrollState; /* 0c67 */ u8 iconScrollToBoxId; // Unused duplicate of scrollToBoxId /* 0c68 */ struct WindowTemplate menuWindow; - /* 0c70 */ struct StorageMenu menuItems[MAX_MENU_ITEMS]; + /* 0c70 */ struct StorageMenu menuItems[7]; /* 0ca8 */ u8 menuItemsCount; /* 0ca9 */ u8 menuWidth; /* 0caa */ u8 menuUnusedField; // Never read. diff --git a/src/pokemon_storage_system_6.c b/src/pokemon_storage_system_6.c index 773c0f8aa..6b8b4f67d 100644 --- a/src/pokemon_storage_system_6.c +++ b/src/pokemon_storage_system_6.c @@ -58,7 +58,7 @@ static const u8 *const sMenuTexts[] = { void SetMenuText(u8 textId) { - if (gPSSData->menuItemsCount < MAX_MENU_ITEMS) + if (gPSSData->menuItemsCount < ARRAY_COUNT(gPSSData->menuItems)) { u8 len; struct StorageMenu *menu = &gPSSData->menuItems[gPSSData->menuItemsCount];