fix: bug where parser incorrectly preserves both DLE and XX

This commit is contained in:
serversdwn
2026-03-12 13:51:00 -04:00
parent 99d66453fe
commit 45f4fb5a68

View File

@@ -321,12 +321,7 @@ def parse_bw(blob: bytes, trailer_len: int, validate_checksum: bool) -> List[Fra
i += 1
continue
# AFTER_DLE
if b == DLE:
body.append(DLE) # 10 10 => literal 10
else:
# Robust recovery: treat as literal DLE + byte
body.append(DLE)
# AFTER_DLE: DLE XX => literal XX for any XX (full DLE stuffing)
body.append(b)
state = IN_FRAME
i += 1