Skip to content

Commit

Permalink
Fix decoding bug related to #10
Browse files Browse the repository at this point in the history
  • Loading branch information
jlacomis committed Aug 28, 2023
1 parent 3fdc2fe commit 1310ac5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binary/dire_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ def start_offsets(self) -> t.Tuple[int, ...]:

@classmethod
def _from_json(cls, d: t.Dict[str, t.Any]) -> "Union":
return cls(name=d["n"], members=d["m"], padding=d["p"])
return cls(name=d["n"], members=d["m"], padding=d["p"] if "p" in d else None)

def _to_json(self) -> t.Dict[str, t.Any]:
encoded = {
Expand Down

0 comments on commit 1310ac5

Please # to comment.