(CGF): prevent false positives.

This commit is contained in:
morkt 2020-03-30 17:36:24 +04:00
parent af970a274c
commit 4ee728bad8

View File

@ -72,6 +72,11 @@ namespace GameRes.Formats.Triangle
return null; return null;
uint index_offset = 4; uint index_offset = 4;
uint size = file.View.ReadUInt32 (index_offset + entry_size - 8);
offset2 = file.View.ReadUInt32 (index_offset + (entry_size * 2) - 4);
if (size == (offset2 - next_offset)) // route2 archives shouldn't have entry size
return null;
var dir = new List<Entry> (count); var dir = new List<Entry> (count);
for (int i = 0; i < count; ++i) for (int i = 0; i < count; ++i)
{ {