1
0
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:
zsilencer
2016-09-14 15:47:23 -06:00
parent dfc100f15e
commit 318adc3fa8

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