mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
(ArcFile.TryOpen): check file length.
This commit is contained in:
parent
9ed37fd878
commit
9fd2defa07
@ -66,6 +66,9 @@ namespace GameRes
|
||||
/// </returns>
|
||||
public static ArcFile TryOpen (string filename)
|
||||
{
|
||||
var info = new FileInfo (filename);
|
||||
if (info.Length < 4)
|
||||
return null;
|
||||
var ext = new Lazy<string> (() => Path.GetExtension (filename).TrimStart ('.').ToLowerInvariant());
|
||||
var file = new ArcView (filename);
|
||||
try
|
||||
|
Loading…
x
Reference in New Issue
Block a user