fix: bug where parser incorrectly preserves both DLE and XX
This commit is contained in:
@@ -321,13 +321,8 @@ def parse_bw(blob: bytes, trailer_len: int, validate_checksum: bool) -> List[Fra
|
|||||||
i += 1
|
i += 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# AFTER_DLE
|
# AFTER_DLE: DLE XX => literal XX for any XX (full DLE stuffing)
|
||||||
if b == DLE:
|
body.append(b)
|
||||||
body.append(DLE) # 10 10 => literal 10
|
|
||||||
else:
|
|
||||||
# Robust recovery: treat as literal DLE + byte
|
|
||||||
body.append(DLE)
|
|
||||||
body.append(b)
|
|
||||||
state = IN_FRAME
|
state = IN_FRAME
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user