mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 20:04:13 +08:00
(AniOpener): check filename extension.
This commit is contained in:
parent
25f9285181
commit
99b8faab23
@ -57,6 +57,8 @@ namespace GameRes.Formats.Ags
|
|||||||
|
|
||||||
public override ArcFile TryOpen (ArcView file)
|
public override ArcFile TryOpen (ArcView file)
|
||||||
{
|
{
|
||||||
|
if (!file.Name.EndsWith (".ani", StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
return null;
|
||||||
uint first_offset = file.View.ReadUInt32 (0);
|
uint first_offset = file.View.ReadUInt32 (0);
|
||||||
if (first_offset < 4 || file.MaxOffset > int.MaxValue || first_offset >= file.MaxOffset || 0 != (first_offset & 3))
|
if (first_offset < 4 || file.MaxOffset > int.MaxValue || first_offset >= file.MaxOffset || 0 != (first_offset & 3))
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user