(ArcFile.TryOpen): check file length.

This commit is contained in:
morkt 2015-07-11 10:19:05 +04:00
parent 9ed37fd878
commit 9fd2defa07

View File

@ -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