(CgOpener): sanity check.

This commit is contained in:
morkt 2016-09-27 16:48:12 +04:00
parent d0c5f958b9
commit 518e731499

View File

@ -58,6 +58,8 @@ namespace GameRes.Formats.Parsley
for (int i = 0; i < count; ++i)
{
var name = file.View.ReadString (index_offset, 0x20);
if (string.IsNullOrWhiteSpace (name))
return null;
var entry = FormatCatalog.Instance.Create<Entry> (name);
entry.Offset = file.View.ReadUInt32 (index_offset+0x20);
entry.Size = file.View.ReadUInt32 (index_offset+0x24);