Roc's Feather: avoid OOB access to gItemAgeReqs (#6297)

This fix is a bit blunt, but in the absence of a better idea it exists
This commit is contained in:
Philip Dubé 2026-03-01 14:55:16 +00:00 committed by GitHub
parent b07c64ecf9
commit 0a946e5b9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 5 deletions

View file

@ -592,7 +592,7 @@ void Play_Init(GameState* thisx) {
gSlotAgeReqs[SLOT_TRADE_CHILD] = AGE_REQ_CHILD;
}
// Handle Rocs Feather requiement
// Handle Rocs Feather requirement
gItemAgeReqs[ITEM_ROCS_FEATHER] = AGE_REQ_NONE;
gSlotAgeReqs[SLOT_NAYRUS_LOVE] = AGE_REQ_NONE;

View file

@ -4,11 +4,9 @@
#include "soh/Enhancements/randomizer/ShuffleTradeItems.h"
#include "soh/Enhancements/randomizer/RocsFeatherCycle.h"
#include "soh/Enhancements/randomizer/randomizerTypes.h"
#include "soh/Enhancements/enhancementTypes.h"
#include "soh/Enhancements/cosmetics/cosmeticsTypes.h"
#include "soh/OTRGlobals.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
u8 gAmmoItems[] = {

View file

@ -15,7 +15,6 @@
#include "vt.h"
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/cosmetics/cosmeticsTypes.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/OTRGlobals.h"
@ -996,7 +995,7 @@ u8 gEquipAgeReqs[][4] = {
};
u8 gItemAgeReqs[] = {
u8 gItemAgeReqs[ITEM_NONE] = {
AGE_REQ_CHILD, // ITEM_DEKU_STICK
AGE_REQ_NONE, // ITEM_DEKU_NUT
AGE_REQ_NONE, // ITEM_BOMB