Fix bitshifting wide types on 32bit platforms

This commit is contained in:
Danny Robson 2013-08-05 16:38:47 +10:00
parent f256f4d0e9
commit a601b20683

View File

@ -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;