[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 01/02: fix bit check in hash
From: |
gnunet |
Subject: |
[gnunet] 01/02: fix bit check in hash |
Date: |
Mon, 25 May 2020 22:24:21 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit 19e3bd32adb2f8926b78bbec7a17c3b1c11b716e
Author: Martin Schanzenbach <address@hidden>
AuthorDate: Mon May 25 12:01:23 2020 +0200
fix bit check in hash
---
src/util/crypto_hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c
index c41c419ff..4982ba404 100644
--- a/src/util/crypto_hash.c
+++ b/src/util/crypto_hash.c
@@ -252,7 +252,7 @@ GNUNET_CRYPTO_hash_get_bit (const struct GNUNET_HashCode
*code, unsigned int
bit)
{
GNUNET_assert (bit < 8 * sizeof(struct GNUNET_HashCode));
- return (((unsigned char *) code)[bit >> 3] & (1 << (bit & 7))) > 0;
+ return (((unsigned char *) code)[bit >> 3] & (128 >> (bit & 7))) > 0;
}
--
To stop receiving notification emails like this one, please contact
address@hidden.