Commit 4fe24b3
committed
[MP/SP] Increase MAX_ANIM_FILES from 16 to 64, add MAX_ANIM_EVENT_FILES
Fixes #817 - spawning more than 16 different NPC types causes a crash
due to out-of-bounds array access in bgAllEvents[].
Split limits into MAX_ANIM_FILES (64) for animation skeletons and
MAX_ANIM_EVENT_FILES (128) for event files, since multiple models can
share a skeleton while having unique animevents.cfg files.
Add bounds checking in BG_ParseAnimationEvtFile and BG_AnimsetAlloc
to prevent out-of-bounds access if limits are exceeded.1 parent e76263d commit 4fe24b3
3 files changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
| 489 | + | |
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1710 | 1710 | | |
1711 | 1711 | | |
1712 | 1712 | | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
1713 | 1718 | | |
1714 | 1719 | | |
1715 | 1720 | | |
| |||
2129 | 2134 | | |
2130 | 2135 | | |
2131 | 2136 | | |
2132 | | - | |
| 2137 | + | |
2133 | 2138 | | |
2134 | 2139 | | |
2135 | 2140 | | |
| |||
2148 | 2153 | | |
2149 | 2154 | | |
2150 | 2155 | | |
2151 | | - | |
| 2156 | + | |
2152 | 2157 | | |
2153 | 2158 | | |
2154 | 2159 | | |
| |||
2159 | 2164 | | |
2160 | 2165 | | |
2161 | 2166 | | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
2162 | 2173 | | |
2163 | 2174 | | |
2164 | 2175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
| 325 | + | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| |||
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
420 | | - | |
| 421 | + | |
421 | 422 | | |
422 | 423 | | |
423 | 424 | | |
| |||
0 commit comments