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

@@ -46,7 +46,7 @@ namespace GameRes.Formats.Nejii
public override ArcFile TryOpen (ArcView file)
{
if (file.MaxOffset < 0x30 || !file.Name.EndsWith (".pcd", StringComparison.InvariantCultureIgnoreCase))
if (file.MaxOffset < 0x30 || !file.Name.HasExtension (".pcd"))
return null;
// check if first entry looks like WAVEFORMAT
ushort channels = file.View.ReadUInt16 (0x12);