(NsaOpener.ReadIndex): abort on zero-length file name.

This commit is contained in:
morkt 2015-11-13 11:41:02 +04:00
parent 81b604b54d
commit 8f6d2963bb

View File

@ -140,7 +140,7 @@ namespace GameRes.Formats.NScripter
if (base_offset - file.Position < 15)
return null;
var name = file.ReadCString();
if (base_offset - file.Position < 13)
if (base_offset - file.Position < 13 || 0 == name.Length)
return null;
var entry = FormatCatalog.Instance.Create<NsaEntry> (name);