base/asm-common.h (x86), and knock-on: Add macros for full-size regs.
[catacomb] / symm / sha256.c
index 5de3966..7f91ff7 100644 (file)
@@ -212,7 +212,7 @@ void sha256_set(sha256_ctx *ctx, const void *buf, unsigned long count)
   ctx->h = LOAD32(p + 28);
   ctx->off = 0;
   ctx->nl = U32(count);
-  ctx->nh = U32(((count & ~MASK32) >> 16) >> 16);
+  ctx->nh = U32(((count & ~(unsigned long)MASK32) >> 16) >> 16);
 }
 
 /* --- @sha256_hash@, @sha224_hash@ --- *