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

@@ -143,7 +143,7 @@ namespace GameRes.Formats.YuRis
input = new ZLibStream (input, CompressionMode.Decompress);
uint unpacked_size = null == packed_entry ? entry.Size : packed_entry.UnpackedSize;
if (null == ypf || 0 == ypf.ScriptKey || unpacked_size <= 0x20
|| !entry.Name.EndsWith (".ybn", StringComparison.InvariantCultureIgnoreCase))
|| !entry.Name.HasExtension (".ybn"))
return input;
using (input)
{