Skip to content

Commit 1049e01

Browse files
committed
Little fix for newint.to_bytes()
1 parent 6aa425b commit 1049e01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

future/types/newint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def to_bytes(self, length, byteorder='big', signed=False):
305305
if length < 0:
306306
raise ValueError("length argument must be non-negative")
307307
if length == 0 and num == 0:
308-
return bytes()
308+
return newbytes()
309309
h = b'%x' % num
310310
s = newbytes((b'0'*(len(h) % 2) + h).zfill(length*2).decode('hex'))
311311
if len(s) > length:

0 commit comments

Comments
 (0)