Permalink
Browse files

CryptoC-3: fix for Merkle tree root issue

  • Loading branch information...
cryptonotefoundation committed Sep 5, 2014
1 parent eefb411 commit 6be8153a8bddf7be43aca1efb829ba719409787a
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/crypto/tree-hash.c
View
@@ -19,7 +19,7 @@ void tree_hash(const char (*hashes)[HASH_SIZE], size_t count, char *root_hash) {
size_t i, j;
size_t cnt = count - 1;
char (*ints)[HASH_SIZE];
for (i = 1; i < sizeof(size_t); i <<= 1) {
for (i = 1; i < 8 * sizeof(size_t); i <<= 1) {
cnt |= cnt >> i;
}
cnt &= ~(cnt >> 1);

0 comments on commit 6be8153

Please sign in to comment.