From f665326a67542c4d197a2bfe32ab70c90328101a Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Tue, 17 Jan 2023 21:40:02 -0500 Subject: [PATCH] workaround for vanilla save check tracker crash (#2359) Co-authored-by: briaguya --- soh/soh/Enhancements/randomizer/3drando/item_list.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/soh/soh/Enhancements/randomizer/3drando/item_list.cpp b/soh/soh/Enhancements/randomizer/3drando/item_list.cpp index 6a80ec6ef..d7fc6cfcc 100644 --- a/soh/soh/Enhancements/randomizer/3drando/item_list.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/item_list.cpp @@ -286,6 +286,11 @@ Item& ItemFromGIID(const int giid) { } index++; } + + // there are vanilla items that don't exist in the item table we're reading from here + // if we made it this far, it means we didn't find an item in the table + // if we don't return anything, the game will crash, so, as a workaround, return greg + return itemTable[GREEN_RUPEE]; } //This function should only be used to place items containing hint text