use HasExtension method instead of string.EndsWith.

This commit is contained in:
morkt
2017-04-10 23:15:13 +04:00
parent e0a5e95081
commit 31a01f2e5d
72 changed files with 105 additions and 114 deletions

View File

@@ -49,7 +49,7 @@ namespace GameRes.Formats.Ags
public override ArcFile TryOpen (ArcView file)
{
if (!file.Name.EndsWith (".ani", StringComparison.InvariantCultureIgnoreCase))
if (!file.Name.HasExtension (".ani"))
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))