From 3fee93ce08a0715f8e3c3a674bb153937e168de6 Mon Sep 17 00:00:00 2001 From: 4tochka Date: Fri, 6 Jul 2018 22:14:28 +0400 Subject: [PATCH] int_to_cint zero value fix --- pybtc/functions/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybtc/functions/tools.py b/pybtc/functions/tools.py index 189fedc..c9130d0 100644 --- a/pybtc/functions/tools.py +++ b/pybtc/functions/tools.py @@ -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