diff options
| author | engineer124 <engineer124engineer124@gmail.com> | 2022-01-17 14:33:56 +1100 |
|---|---|---|
| committer | engineer124 <engineer124engineer124@gmail.com> | 2022-01-17 14:33:56 +1100 |
| commit | 90a5abfb837ac949848738174081bdf3d61a9736 (patch) | |
| tree | 8a4bfb0c39e7571912f604f6f30df6ad984bb93a /src/code/sys_math.c | |
| parent | e43d736fbc5a4a6443ac5d04efbd762c0b591ccc (diff) | |
| parent | 0da2ed135b004aa75b0fc9863688e2de9a45fdbd (diff) | |
Merge branch 'master' into parameter
Diffstat (limited to 'src/code/sys_math.c')
| -rw-r--r-- | src/code/sys_math.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/code/sys_math.c b/src/code/sys_math.c index 9b274c7e2..da4ccc9d2 100644 --- a/src/code/sys_math.c +++ b/src/code/sys_math.c @@ -34,7 +34,7 @@ f32 func_80179400(s32 n) { //! @bug No check for negative argument. Will read the array out-of-bounds if the argument is negative. //! (The OoT version does an unsigned check instead, which will return sFactorialTbl[12] for a negative argument.) - if (n > 12) { + if (n >= ARRAY_COUNT(sFactorialTbl)) { ret = sFactorialTbl[12]; for (i = 13; i <= n; i++) { ret *= i; |
