Prevent NewGRFs from using Action A to replace internal sprites
This commit is contained in:
@@ -705,6 +705,11 @@ bool LoadNextSprite(int load_index, SpriteFile &file, uint file_sprite_id)
|
||||
|
||||
if (type == ST_INVALID) return false;
|
||||
|
||||
if (load_index == -1) {
|
||||
if (data != nullptr) _last_sprite_allocation.Clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (load_index >= MAX_SPRITES) {
|
||||
usererror("Tried to load too many sprites (#%d; max %d)", load_index, MAX_SPRITES);
|
||||
}
|
||||
|
Reference in New Issue
Block a user