Merge pull request #1978 from DizzyEggg/windows_overflow

Fix HideMapNamePopUpWindow possible overflow
This commit is contained in:
GriffinR
2024-02-04 20:34:17 -05:00
committed by GitHub
2 changed files with 7 additions and 7 deletions
-5
View File
@@ -15,11 +15,6 @@ SECTIONS {
ewram 0x2000000 (NOLOAD) : ewram 0x2000000 (NOLOAD) :
ALIGN(4) ALIGN(4)
{ {
/*
We link malloc.o here to prevent `gHeap` from landing in the middle of EWRAM.
Otherwise this causes corruption issues on some ld versions
*/
gflib/malloc.o(ewram_data);
src/*.o(ewram_data); src/*.o(ewram_data);
gflib/*.o(ewram_data); gflib/*.o(ewram_data);
} > EWRAM } > EWRAM
+5
View File
@@ -316,9 +316,14 @@ static void Task_MapNamePopUpWindow(u8 taskId)
void HideMapNamePopUpWindow(void) void HideMapNamePopUpWindow(void)
{ {
if (FuncIsActiveTask(Task_MapNamePopUpWindow)) if (FuncIsActiveTask(Task_MapNamePopUpWindow))
{
#ifdef UBFIX
if (GetMapNamePopUpWindowId() != WINDOW_NONE)
#endif // UBFIX
{ {
ClearStdWindowAndFrame(GetMapNamePopUpWindowId(), TRUE); ClearStdWindowAndFrame(GetMapNamePopUpWindowId(), TRUE);
RemoveMapNamePopUpWindow(); RemoveMapNamePopUpWindow();
}
SetGpuReg_ForcedBlank(REG_OFFSET_BG0VOFS, 0); SetGpuReg_ForcedBlank(REG_OFFSET_BG0VOFS, 0);
DestroyTask(sPopupTaskId); DestroyTask(sPopupTaskId);
} }