mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 12:33:17 +01:00
Fix #4434: Crash when sprite limit is reached
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user