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

@@ -90,7 +90,7 @@ namespace GameRes.Formats.Yuka
public override Stream OpenEntry (ArcFile arc, Entry entry)
{
if (entry.Size < 0x24
|| !entry.Name.EndsWith (".yks", StringComparison.InvariantCultureIgnoreCase)
|| !entry.Name.HasExtension (".yks")
|| !arc.File.View.AsciiEqual (entry.Offset, "YKS001")
|| 1 != arc.File.View.ReadUInt16 (entry.Offset+6))
return base.OpenEntry (arc, entry);