mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
use HasExtension method instead of string.EndsWith.
This commit is contained in:
@@ -68,7 +68,7 @@ namespace GameRes.Formats.Cadath
|
||||
|
||||
public override Stream OpenEntry (ArcFile arc, Entry entry)
|
||||
{
|
||||
if (!entry.Name.EndsWith (".snr", System.StringComparison.InvariantCultureIgnoreCase)
|
||||
if (!entry.Name.HasExtension (".snr")
|
||||
|| !arc.File.View.AsciiEqual (entry.Offset, "SNR\x1A"))
|
||||
return base.OpenEntry (arc, entry);
|
||||
try
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace GameRes.Formats.Cadath
|
||||
public override Stream OpenEntry (ArcFile arc, Entry entry)
|
||||
{
|
||||
var input = arc.File.CreateStream (entry.Offset, entry.Size);
|
||||
if (!entry.Name.EndsWith (".ns6", StringComparison.InvariantCultureIgnoreCase))
|
||||
if (!entry.Name.HasExtension (".ns6"))
|
||||
return input;
|
||||
byte key = (byte)(entry.Size / 7);
|
||||
return new XoredStream (input, key);
|
||||
|
||||
Reference in New Issue
Block a user