diff options
| author | EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> | 2022-01-16 17:55:03 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-16 17:55:03 +0000 |
| commit | 924fa9aadf99f9efdc3cd19411bb1c834f3ad74c (patch) | |
| tree | bdc8a6dc1920ec7da9f51eead1a19ea15a3f6a47 /src/code/sys_math.c | |
| parent | b47941968d9e718fe54d6a0c35f987c5788500ed (diff) | |
EnMag OK and documented (#547)
* Name textures in object_mag
* Corrections
* tabs -> spaces
* OK, data imported
* Remove obsolete comment
* Start documentation
* Defines for most texture sizes
* Name most static variables, add state enum
* Macros, name all the statics
* Couple of minor tweaks to other files
* Name some more effect stuff
* Fix kanfont data
* Name everything else, move macros
* Format
* Review
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; |
