diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2021-06-26 08:49:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-26 08:49:26 -0400 |
commit | 8116790c0880cbe03e8d14efe88bf6000f283819 (patch) | |
tree | 3aa2ee9c61df4b47ba7c1e60bb7c6754f2614b1d | |
parent | 4c26116d1ae8cebf2b126ed5da1a85127590cd05 (diff) | |
parent | 92dccca2ee73dece390f921dbce5dfa01244fb25 (diff) |
Merge pull request #443 from LOuroboros/patch-1
Informative note about PewterCity_Gym_Text_BrockDefeat
-rw-r--r-- | data/maps/PewterCity_Gym/text.inc | 3 | ||||
-rw-r--r-- | src/battle_main.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/data/maps/PewterCity_Gym/text.inc b/data/maps/PewterCity_Gym/text.inc index b6a1d87ee..4ba144beb 100644 --- a/data/maps/PewterCity_Gym/text.inc +++ b/data/maps/PewterCity_Gym/text.inc @@ -14,6 +14,9 @@ PewterCity_Gym_Text_BrockIntro:: @ 8190CD4 .string "Fine, then!\n" .string "Show me your best!{PLAY_BGM}{MUS_ENCOUNTER_GYM_LEADER}$" +@ NOTE: This defeat text actually causes a buffer overflow. It's too long for the gDisplayedStringBattle +@ buffer that it's put into, and it stomps all over the gBattleTextBuffs after, as well as the otherwise +@ unused array after that, gUnknown_2022AE8. Perhaps that's the reason why said array exists. PewterCity_Gym_Text_BrockDefeat:: @ 8190E4F .string "I took you for granted, and so\n" .string "I lost.\p" diff --git a/src/battle_main.c b/src/battle_main.c index 021a0ca81..53757d13c 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -125,7 +125,7 @@ EWRAM_DATA u8 gDisplayedStringBattle[300] = {0}; EWRAM_DATA u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT] = {0}; EWRAM_DATA u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT] = {0}; EWRAM_DATA u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT] = {0}; -static EWRAM_DATA u32 gUnknown_2022AE8[25] = {0}; +static EWRAM_DATA u32 gUnknown_2022AE8[25] = {0}; // Note: This shouldn't be removed without adjusting the size of gDisplayedStringBattle. EWRAM_DATA u32 gBattleTypeFlags = 0; EWRAM_DATA u8 gBattleTerrain = 0; EWRAM_DATA u32 gUnknown_2022B54 = 0; |