(LWG): ignore empty entries.

This commit is contained in:
morkt 2016-10-14 10:20:42 +04:00
parent 322632e4d8
commit 3391bcfa46

View File

@ -72,9 +72,11 @@ namespace GameRes.Formats.Liar
cur_offset += 18+name_length; cur_offset += 18+name_length;
if (cur_offset > dir_size+24) if (cur_offset > dir_size+24)
return null; return null;
if (entry.CheckPlacement (data_offset + data_size)) if (entry.Size > 0 && entry.CheckPlacement (data_offset + data_size))
dir.Add (entry); dir.Add (entry);
} }
if (0 == dir.Count)
return null;
return new ArcFile (file, this, dir); return new ArcFile (file, this, dir);
} }
} }