(MBF): handle single-entries archives.

This commit is contained in:
morkt 2018-07-06 15:36:23 +04:00
parent c3b3bb0ee3
commit 304a448937

View File

@ -49,7 +49,7 @@ namespace GameRes.Formats.Will
return null; return null;
uint data_offset = file.View.ReadUInt32 (8); uint data_offset = file.View.ReadUInt32 (8);
uint index_offset = 0x20; uint index_offset = 0x20;
if (0 != (file.View.ReadByte (0xC) & 1)) if (0 != (file.View.ReadByte (0xC) & 1) && count > 1)
{ {
index_offset += file.View.ReadUInt16 (index_offset); index_offset += file.View.ReadUInt16 (index_offset);
--count; --count;