Skip to content

Commit

Permalink
Missing length override handling in overlay parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggog committed Dec 21, 2023
1 parent 96341e4 commit a2bb5fb
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,15 @@ public void FillTypelessSubrecordTypes(
while (!stream.Complete && stream.Position < finalPos)
{
SubrecordHeader subMeta = stream.GetSubrecordHeader();
var minimumFinalPos = stream.Position + subMeta.TotalLength;
var minimumFinalPos = stream.Position;
if (lastParsed.LengthOverride.HasValue)
{
minimumFinalPos += lastParsed.LengthOverride.Value + subMeta.HeaderLength;
}
else
{
minimumFinalPos += subMeta.TotalLength;
}
var parsed = fill(
stream: stream,
finalPos: minimumFinalPos,
Expand Down

0 comments on commit a2bb5fb

Please sign in to comment.