progs/..., symm/...: Fix 32-bit right-shift idiom.
[catacomb] / symm / whirlpool.c
index 708e3fc..f22a366 100644 (file)
@@ -206,7 +206,7 @@ void whirlpool_set(whirlpool_ctx *ctx, const void *buf, unsigned long count)
   }
   ctx->off = 0;
   ctx->nl = U32(count);
-  ctx->nh = U32(((count & ~MASK32) >> 16) >> 16);
+  ctx->nh = U32(((count & ~(unsigned long)MASK32) >> 16) >> 16);
 }
 
 /* --- @whirlpool_hash@, @whirlpool256_hash@ --- *