mirror of
https://github.com/sonicdcer/sf64.git
synced 2024-11-23 04:50:05 +00:00
Fix Zones boss UB
This commit is contained in:
parent
611e14e977
commit
561f6a76d9
@ -302,13 +302,21 @@ void Spawner_ObjKill(void) {
|
||||
}
|
||||
|
||||
// Use this function to add code that eases your documentation work!
|
||||
Spawner_Playground(void) {
|
||||
void Spawner_Playground(void) {
|
||||
Player* player = &gPlayer[0];
|
||||
|
||||
player->mercyTimer = 100;
|
||||
gLaserStrength[0] = 2;
|
||||
gBombCount[0] = 9;
|
||||
gLifeCount[0] = 9;
|
||||
|
||||
#if 0
|
||||
if (gControllerPress[0].button & L_JPAD) {
|
||||
gArwingSpeed -= 50;
|
||||
} else if (gControllerPress[0].button & R_JPAD) {
|
||||
gArwingSpeed += 50;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Spawner(void) {
|
||||
|
@ -3271,14 +3271,13 @@ void Zoness_801986FC(ZoSarumarine* this, s32 arg1, f32 xOff, f32 yOff, f32 zOff,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef AVOID_UB
|
||||
if (i < ARRAY_COUNT(gActors)) {
|
||||
#else
|
||||
#ifndef AVOID_UB
|
||||
// @Bug: checking out of bounds
|
||||
// If this passes the boss kills himself.
|
||||
if (i >= ARRAY_COUNT(gActors)) {
|
||||
#endif
|
||||
actor245->obj.status = OBJ_FREE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Zoness_801989FC(ZoSarumarine* this) {
|
||||
|
Loading…
Reference in New Issue
Block a user