Skip to content

Commit

Permalink
Try something different in StructPrimitives
Browse files Browse the repository at this point in the history
  • Loading branch information
Werni2A committed Dec 16, 2023
1 parent 692f81a commit 954babd
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/Structures/StructPrimitives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,24 @@ void StructPrimitives::read(FileFormatVersion /* aVersion */)

localFutureLst.checkpoint();

auto genProp = StructGeneralProperties{mCtx.get()};
genProp.read();
generalProperties = genProp;
spdlog::debug("Checking {} vs {}", localFutureLst.cbegin()->getStopOffset(), ds.getCurrentOffset());
if(localFutureLst.cbegin()->getStopOffset() != ds.getCurrentOffset())
{
readPreamble();

localFutureLst.checkpoint();
for(std::size_t i{0U}; i < std::size_t{4U}; ++i)
{
const std::string s = ds.readStringLenZeroTerm();
spdlog::trace("s[{}] = {}", i, s);
}

if(localFutureLst.cbegin()->getStopOffset() != ds.getCurrentOffset())
{
ds.printUnknownData(2, getMethodName(this, __func__) + ": Interesting but weird bytes");
}

localFutureLst.checkpoint();
}

localFutureLst.sanitizeCheckpoints();

Expand Down

0 comments on commit 954babd

Please sign in to comment.