Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 0637385

Browse files
author
Jan Xie
committed
fix value bound check in encode_single
1 parent 4303bde commit 0637385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ethereum/abi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def encode_single(typ, arg):
186186
elif base == 'int':
187187
sub = int(sub)
188188
i = decint(arg)
189-
if not -2**(sub - 1) <= i < 2**sub:
189+
if not -2**(sub - 1) <= i < 2**(sub - 1):
190190
raise ValueOutOfBounds(repr(arg))
191191
return zpad(encode_int(i % 2**sub), 32)
192192
# Unsigned reals: ureal<high>x<low>

0 commit comments

Comments
 (0)