Skip to content

Commit

Permalink
Print discarded bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Werni2A committed Dec 31, 2023
1 parent 1ac812a commit 2611f05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/GenericParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ void GenericParser::discard_until_preamble()
}

const size_t endOffset = mCtx.mDs.getCurrentOffset();
const size_t discardedByte = endOffset - startOffset;

mCtx.mLogger.debug("{}: Discarded {} Byte until next preamble",
getMethodName(this, __func__), endOffset - startOffset);
getMethodName(this, __func__), discardedByte);

mCtx.mDs.setCurrentOffset(startOffset);
mCtx.mDs.printUnknownData(discardedByte, "Discarded Bytes");
}


Expand Down

0 comments on commit 2611f05

Please sign in to comment.