From 07da6dacc057f35b4cb8cb487a26a35df063df3c Mon Sep 17 00:00:00 2001 From: Sonic Dreamcaster Date: Sat, 16 Nov 2024 14:05:55 -0300 Subject: [PATCH] fix UB in train --- src/overlays/ovl_i5/fox_ma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index c2ac7a28..fa994da6 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -4227,6 +4227,10 @@ void Macbeth_Actor207_Update(Actor207* this) { s16 spC6; u8 i; + #ifdef AVOID_UB + sp374 = 0.0f; +#endif + switch (this->state) { case 0: Macbeth_8019A198(this);