(Dogenzaka.BinOpener): additional sanity check.

This commit is contained in:
morkt 2017-03-24 22:47:06 +04:00
parent 8947e19d00
commit 002158cbbb

View File

@ -135,7 +135,7 @@ namespace GameRes.Formats.Dogenzaka
var entry = AutoEntry.Create (file, next_offset, name);
next_offset = base_offset + file.View.ReadUInt32 (index_offset);
entry.Size = next_offset - (uint)entry.Offset;
if (!entry.CheckPlacement (file.MaxOffset))
if (0 == entry.Size || !entry.CheckPlacement (file.MaxOffset))
return null;
dir.Add (entry);
}