From a601b20683f807d50681efe824d62f6d4b15b537 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 5 Aug 2013 16:38:47 +1000 Subject: [PATCH] Fix bitshifting wide types on 32bit platforms --- hash/sha1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash/sha1.cpp b/hash/sha1.cpp index c6a6c6cc..3b05665e 100644 --- a/hash/sha1.cpp +++ b/hash/sha1.cpp @@ -168,7 +168,7 @@ SHA1::finish (void) { size_t index = (total / sizeof (W[0])) % BLOCK_SIZE; size_t octet = sizeof (W[0]) - total % sizeof (W[0]) - 1; - W[index] |= 0x80 << octet * 8; + W[index] |= 0x80u << octet * 8u; if (index >= BLOCK_SIZE - 2) { W[elems(W) - 2] = 0; W[elems(W) - 1] = 0;