From ebd9b99357220e066e50573a40fd3740e24ae0c1 Mon Sep 17 00:00:00 2001 From: jojobear13 Date: Mon, 8 Jan 2024 00:41:42 -0600 Subject: [PATCH] Fixed TM moves crashing when used subsequently --- home/names.asm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/home/names.asm b/home/names.asm index f7751fa0..0ac39b1c 100644 --- a/home/names.asm +++ b/home/names.asm @@ -29,6 +29,14 @@ GetItemName:: ; starting at wcd6d push hl push bc + + ;If you are going to make GetName check for wNameListType=ITEM_NAME, + ;then you have to make sure wNameListType get the proper value here. + ;Otherwise the game can crash when trying to learn TMHM items one after the other. + ;Specifically if only TMHM items are in the current list view. - jojo + ld a, ITEM_NAME + ld [wNameListType], a + ld a, [wd11e] cp HM01 ; is this a TM/HM? jr nc, .Machine