mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #4434: Crash when sprite limit is reached
This commit is contained in:
parent
dfc100f15e
commit
318adc3fa8
|
@ -259,7 +259,7 @@ rct_sprite *create_sprite(uint8 bl)
|
|||
size_t linkedListTypeOffset = SPRITE_LIST_UNKNOWN * 2;
|
||||
if ((bl & 2) != 0) {
|
||||
// 69EC96;
|
||||
sint16 cx = 0x12C - gSpriteListCount[SPRITE_LIST_MISC];
|
||||
uint16 cx = 0x12C - gSpriteListCount[SPRITE_LIST_MISC];
|
||||
if (cx >= gSpriteListCount[SPRITE_LIST_NULL]) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue