mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
Fix Scrolling Textures Crash
This commit is contained in:
parent
7ab8b7aaa0
commit
ed0b8b177f
1 changed files with 1 additions and 0 deletions
|
@ -24,6 +24,7 @@ struct ScrollTarget *get_scroll_targets(u32 id, u16 size, u16 offset) {
|
|||
if ((!scroll->hasOffset && offset > 0) || size < scroll->size) {
|
||||
if (scroll->hasOffset) { return NULL; }
|
||||
if (size > scroll->size) { size = scroll->size; } // Don't use an invalid size
|
||||
if (size + offset >= scroll->size) { return NULL; } // If the offset is invalid, Abort.
|
||||
scroll->hasOffset = true;
|
||||
Vtx* *newVtx = calloc(size, sizeof(Vtx*));
|
||||
if (!newVtx) { return NULL; }
|
||||
|
|
Loading…
Reference in a new issue