Fix #4434: Crash when sprite limit is reached

This commit is contained in:
zsilencer 2016-09-14 15:47:23 -06:00
parent dfc100f15e
commit 318adc3fa8
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}