Fix some UBs (#544)

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
This commit is contained in:
MelonSpeedruns
2026-04-25 16:59:04 -04:00
committed by GitHub
parent 4e264d6a22
commit e755148f16
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -5877,6 +5877,11 @@ void daAlink_c::setItemMatrix(int param_0) {
modelCalc(mSheathModel);
int var_r26;
#if AVOID_UB
var_r26 = 0;
#endif
if (!checkNoResetFlg3(FLG3_UNK_4000000)) {
if (mEquipItem == 0x103 || param_0 != 0) {
mSwordModel->setBaseTRMtx(mpLinkModel->getAnmMtx(mLeftItemJntNo));
+4
View File
@@ -789,6 +789,10 @@ void dFlower_packet_c::draw() {
GXColor sp28;
#if AVOID_UB
sp28 = {1, 1, 1, 1};
#endif
//u8 sp26, sp25, sp24;
GXColor sp24;
sp24.r = -0.4f * temp_r29->AmbCol.r * var_f29;