CryptoC-3: fix for Merkle tree root issue

This commit is contained in:
jezal 2014-09-04 17:37:24 +01:00
parent 9df3a81801
commit 6b1858d965
2 changed files with 2 additions and 2 deletions

View file

@ -32,7 +32,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);

View file

@ -1,4 +1,4 @@
#define BUILD_COMMIT_ID "@VERSION@"
#define PROJECT_VERSION "1.0.2"
#define PROJECT_VERSION_BUILD_NO "336"
#define PROJECT_VERSION_BUILD_NO "358"
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO "(" BUILD_COMMIT_ID ")"