(svn r4481) - Fix: Validate the given sprite ID when loading a sprite.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
peter1138 18 years ago
parent ccdf322799
commit 3786527e6b

@ -149,6 +149,10 @@ bool LoadNextSprite(int load_index, byte file_index)
if (!ReadSpriteHeaderSkipData()) return false;
if (load_index >= MAX_SPRITES) {
error("Tried to load too many sprites (#%d; max %d)", load_index, MAX_SPRITES);
}
_sprite_file_pos[load_index] = file_pos;
_sprite_ptr[load_index] = NULL;

Loading…
Cancel
Save