mirror of
https://github.com/lifegpc/GARbro.git
synced 2026-06-06 05:28:49 +08:00
(AniOpener): check filename extension.
This commit is contained in:
@@ -57,6 +57,8 @@ namespace GameRes.Formats.Ags
|
||||
|
||||
public override ArcFile TryOpen (ArcView file)
|
||||
{
|
||||
if (!file.Name.EndsWith (".ani", StringComparison.InvariantCultureIgnoreCase))
|
||||
return null;
|
||||
uint first_offset = file.View.ReadUInt32 (0);
|
||||
if (first_offset < 4 || file.MaxOffset > int.MaxValue || first_offset >= file.MaxOffset || 0 != (first_offset & 3))
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user