From e3c793f702506483963955316a0dedd7b6556af4 Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Fri, 26 Aug 2016 16:20:26 +0000 Subject: [PATCH] uint: bugfix in trailing_zeroes() --- Cargo.toml | 2 +- src/util/uint.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6263925..c4f2a91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bitcoin" -version = "0.8.0" +version = "0.8.1" authors = ["Andrew Poelstra "] license = "CC0-1.0" homepage = "https://github.com/apoelstra/rust-bitcoin/" diff --git a/src/util/uint.rs b/src/util/uint.rs index a505e43..19c90fa 100644 --- a/src/util/uint.rs +++ b/src/util/uint.rs @@ -202,7 +202,7 @@ macro_rules! construct_uint { for i in 0..($n_words - 1) { if arr[i] > 0 { return (0x40 * i) + arr[i].trailing_zeros() as usize; } } - (0x40 * ($n_words - 1)) + arr[3].trailing_zeros() as usize + (0x40 * ($n_words - 1)) + arr[$n_words - 1].trailing_zeros() as usize } }