From 19e3bd32adb2f8926b78bbec7a17c3b1c11b716e Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Mon, 25 May 2020 12:01:23 +0200 Subject: [PATCH] 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; } -- 2.25.1