Skip to content

Commit

Permalink
fix bss array heap overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicdcer committed Nov 17, 2024
1 parent 7dd1e74 commit dc3cbfe
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/overlays/ovl_i5/fox_ma.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ s16 D_i5_801BE320[35];
f32 D_i5_801BE368[50];
Vec3f D_i5_801BE430[50];
Vec3f D_i5_801BE688[2];
Vec3f D_i5_801BE6A0[6];
Vec3f D_i5_801BE6E8[6];
Vec3f D_i5_801BE6A0[12];
s32 D_i5_801BE734[4];

UnkStruct_D_i5_801B8E50 D_i5_801B8E50[156] = {
Expand Down Expand Up @@ -2821,27 +2820,27 @@ void Macbeth_MaTrainStopBlock_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* this
switch (limbIndex) {
case 1:
Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[0]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[0]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6A0[6]);
break;
case 2:
Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[1]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[1]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6A0[7]);
break;
case 3:
Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[2]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[2]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6A0[8]);
break;
case 4:
Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[3]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[3]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6A0[9]);
break;
case 5:
Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[4]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[4]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6A0[10]);
break;
case 11:
Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[5]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[5]);
Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6A0[11]);
break;

default:
Expand Down

0 comments on commit dc3cbfe

Please sign in to comment.