mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-30 19:08:12 +03:00
Fix bug in sact_get_sprite
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ TAILQ_HEAD(listhead, sact_sprite) sprite_list =
|
||||
|
||||
struct sact_sprite *sact_get_sprite(int sp)
|
||||
{
|
||||
if (sp >= nr_sprites)
|
||||
if (sp < 0 || sp >= nr_sprites)
|
||||
return NULL;
|
||||
return sprites[sp];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user