diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2022-02-21 21:01:28 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-21 19:01:28 -0500 |
| commit | 2306e094b28620f0e323bf4af61f8e00450e38fa (patch) | |
| tree | d3bbbd2f2354f171d6c5c85d9f4d0369a6449de0 /src/code/sys_matrix.c | |
| parent | 145b14dbc4eeabe2547d458de7bbd3fffd446190 (diff) | |
Fix oob access in Matrix_SetTranslateScaleMtx2 (#1152)
Diffstat (limited to 'src/code/sys_matrix.c')
| -rw-r--r-- | src/code/sys_matrix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/code/sys_matrix.c b/src/code/sys_matrix.c index b903a77b1..9f44a9931 100644 --- a/src/code/sys_matrix.c +++ b/src/code/sys_matrix.c @@ -1118,7 +1118,7 @@ void Matrix_SetTranslateScaleMtx2(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, (*m)[2][1] = 0; (*m)[0][3] = 0; (*m)[2][3] = 0; - (*m)[0][4] = 0; + (*m)[1][0] = 0; fixedPoint = (s32)(scaleX * 0x10000); (*m)[0][0] = fixedPoint; @@ -1134,7 +1134,7 @@ void Matrix_SetTranslateScaleMtx2(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, intPart[11] = 0; (*m)[3][1] = fixedPoint << 16; - (*m)[2][4] = 0; + (*m)[3][0] = 0; fixedPoint = (s32)(translateX * 0x10000); intPart[12] = (fixedPoint >> 16) & 0xFFFF; |
