summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-05-25 12:01:23 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-05-25 12:01:23 +0200
commit19e3bd32adb2f8926b78bbec7a17c3b1c11b716e (patch)
tree2f6c6d1ed8b561c02909e89f50a78ede2761ed6a
parent19cd0e6d0eca5192a9c8f4f005abd85d531949f1 (diff)
fix bit check in hash
-rw-r--r--src/util/crypto_hash.c2
1 files changed, 1 insertions, 1 deletions
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;
}