Skip to content

Commit

Permalink
Modulo simplified.
Browse files Browse the repository at this point in the history
  • Loading branch information
arekbulski committed Aug 23, 2016
1 parent 32b50ec commit 31aa9ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion construct/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def Aligned(subcon, modulus=4, pattern=b"\x00"):
if modulus < 2:
raise ValueError("modulus must be >= 2", modulus)
def padlength(ctx):
return (modulus - (subcon._sizeof(ctx) % modulus)) % modulus
return -subcon._sizeof(ctx) % modulus
return SeqOfOne(subcon.name,
subcon,
# ??????
Expand Down

0 comments on commit 31aa9ae

Please sign in to comment.