int_to_cint zero value fix

This commit is contained in:
4tochka 2018-07-06 22:14:28 +04:00
parent ac6f70f5fd
commit 3fee93ce08

View File

@ -172,7 +172,7 @@ def int_to_c_int(n, base_bytes=1):
:return: bytes.
"""
if n == 0:
return b'\x00'
return b'\x00' * base_bytes
else:
l = n.bit_length() + 1
min_bits = base_bytes * 8 - 1