Handle invalid texture counts

This commit is contained in:
Matt Nadareski
2024-04-02 16:55:43 -04:00
parent fc5374108c
commit 8ca9ccaf00

View File

@@ -149,6 +149,8 @@ namespace SabreTools.Serialization.Streams
for (int i = 0; i < textureHeader.TextureCount; i++)
{
offsets[i] = data.ReadUInt32();
if (data.Position >= data.Length)
break;
}
textureHeader.Offsets = offsets;