electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit faa002f53ce37a2941e82800bd518c56cc57637b
parent 4038c0273fa5a1d0aa787f392ad8a8e58afb148b
Author: ThomasV <thomasv@gitorious>
Date:   Fri, 26 Oct 2012 22:51:33 +0200

fix: below or equal in var_int encoding

Diffstat:
Mlib/bitcoin.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bitcoin.py b/lib/bitcoin.py @@ -31,9 +31,9 @@ def int_to_hex(i, length=1): def var_int(i): if i<0xfd: return int_to_hex(i) - elif i<0xffff: + elif i<=0xffff: return "fd"+int_to_hex(i,2) - elif i<0xffffffff: + elif i<=0xffffffff: return "fe"+int_to_hex(i,4) else: return "ff"+int_to_hex(i,8)