From 99b8faab2379eff606e8bc1b39e38b239a04f4b8 Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 25 Feb 2017 02:01:34 +0400 Subject: [PATCH] (AniOpener): check filename extension. --- ArcFormats/AnimeGameSystem/ImageAinos.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ArcFormats/AnimeGameSystem/ImageAinos.cs b/ArcFormats/AnimeGameSystem/ImageAinos.cs index 5a3d9512..d43aea97 100644 --- a/ArcFormats/AnimeGameSystem/ImageAinos.cs +++ b/ArcFormats/AnimeGameSystem/ImageAinos.cs @@ -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;