Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hyazinthh committed Nov 15, 2022
2 parents 1f40f30 + 42a666e commit 6887916
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Aardvark.Base.IO/BinaryReadingCoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,21 @@ public void Code(ref object obj)
if (tmobj != null) CodeFields(typeInfo.Type, tmobj);
}
if ((typeInfo.Options & TypeInfo.Option.Size) != 0)
m_reader.BaseStream.Position = end;
{
if (m_reader.BaseStream.Position != end)
{
Report.Warn("invalid stream position after reading type \"{0}\" (potentially skipping referenced objects)", typeName);
m_reader.BaseStream.Position = end;
}
}
}
else
{
if ((typeInfo.Options & TypeInfo.Option.Size) != 0)
{
m_reader.BaseStream.Position = end;
Report.Warn(
"skipping object of uncodeable type \"{0}\"",
"skipping object of uncodeable type \"{0}\" (potentially skipping referenced objects)",
typeName);
obj = null;
}
Expand Down

0 comments on commit 6887916

Please sign in to comment.