(CGF): sanity check.

This commit is contained in:
morkt 2017-12-31 09:02:24 +04:00
parent b66893a2aa
commit 364049f72a

View File

@ -76,6 +76,8 @@ namespace GameRes.Formats.Triangle
for (int i = 0; i < count; ++i) for (int i = 0; i < count; ++i)
{ {
var name = file.View.ReadString (index_offset, entry_size-4); var name = file.View.ReadString (index_offset, entry_size-4);
if (!IsValidEntryName (name))
return null;
uint flags = next_offset >> 30; uint flags = next_offset >> 30;
Entry entry; Entry entry;
if (1 == flags || name.HasExtension (".iaf")) if (1 == flags || name.HasExtension (".iaf"))