Skip to content

Commit

Permalink
Work around bug #76 decoding particular MS+ effect
Browse files Browse the repository at this point in the history
  • Loading branch information
mungewell committed Sep 13, 2024
1 parent 98e82f8 commit 4d250d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zoomzt2.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@
TXE1 = Struct(
Const(b"TXE1"),
"length" / Int32ul,
"description" / PaddedString(this.length, "ascii"),
"peekdescription" / Peek(FixedSized(this.length, PaddedString(this.length, "ascii"))),
"description" / IfThenElse(lambda ctx: ctx.peekdescription == None,
"description" / Bytes(this.length),
"description" / PaddedString(this.length, "ascii"),
),
)

INFO = Struct(
Expand Down

0 comments on commit 4d250d9

Please sign in to comment.