uint: bugfix in trailing_zeroes()

This commit is contained in:
Andrew Poelstra 2016-08-26 16:20:26 +00:00
parent af10b153be
commit e3c793f702
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
[package]
name = "bitcoin"
version = "0.8.0"
version = "0.8.1"
authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>"]
license = "CC0-1.0"
homepage = "https://github.com/apoelstra/rust-bitcoin/"

View File

@ -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
}
}