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:
@@ -78,7 +78,7 @@ namespace GameRes.Formats.Triangle
|
||||
var name = file.View.ReadString (index_offset, entry_size-4);
|
||||
uint flags = next_offset >> 30;
|
||||
Entry entry;
|
||||
if (1 == flags || name.EndsWith (".iaf", StringComparison.InvariantCultureIgnoreCase))
|
||||
if (1 == flags || name.HasExtension (".iaf"))
|
||||
entry = new Entry();
|
||||
else
|
||||
entry = new CgfEntry { Flags = flags };
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace GameRes.Formats.Triangle
|
||||
|
||||
public override ArcFile TryOpen (ArcView file)
|
||||
{
|
||||
if (!file.Name.EndsWith (".iaf", StringComparison.InvariantCultureIgnoreCase)
|
||||
if (!file.Name.HasExtension (".iaf")
|
||||
|| file.MaxOffset < 0x20)
|
||||
return null;
|
||||
uint size = file.View.ReadUInt32 (1);
|
||||
|
||||
Reference in New Issue
Block a user