mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-14 01:32:23 +01:00
Fix UB: Destoyed task is modified.
After destruction, task is no longer used, so updating its values is worthless.
This commit is contained in:
parent
f62b42eb59
commit
ab8318cc79
@ -4328,7 +4328,10 @@ static bool8 Phase2_FrontierSquaresScroll_Func5(struct Task *task)
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
|
||||
DestroyTask(FindTaskIdByFunc(task->func));
|
||||
|
||||
#ifndef UBFIX
|
||||
task->tState++; // UB: changing value of a destroyed task
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user