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:
@@ -42,7 +42,7 @@ namespace GameRes.Formats.Propeller
|
||||
|
||||
public override ArcFile TryOpen (ArcView file)
|
||||
{
|
||||
if (!file.Name.EndsWith (".mgr", StringComparison.InvariantCultureIgnoreCase))
|
||||
if (!file.Name.HasExtension (".mgr"))
|
||||
return null;
|
||||
int count = file.View.ReadInt16 (0);
|
||||
if (count <= 0 || count >= 0x100)
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace GameRes.Formats.Propeller
|
||||
public override Stream OpenEntry (ArcFile arc, Entry entry)
|
||||
{
|
||||
var input = arc.File.CreateStream (entry.Offset, entry.Size);
|
||||
if (!entry.Name.EndsWith (".msc", StringComparison.InvariantCultureIgnoreCase)
|
||||
if (!entry.Name.HasExtension (".msc")
|
||||
|| 0x88 != input.PeekByte())
|
||||
return input;
|
||||
return new XoredStream (input, 0x88);
|
||||
|
||||
Reference in New Issue
Block a user