From 67eb76fd1b6eca4895f90814360a231d90ad381a Mon Sep 17 00:00:00 2001 From: Jan Pochyla Date: Sat, 15 Feb 2014 15:39:17 +0100 Subject: [PATCH] llu -> ull for MSVC compatibility --- bignum.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bignum.c b/bignum.c index 5117d0bed6..aca0454838 100644 --- a/bignum.c +++ b/bignum.c @@ -209,11 +209,11 @@ void bn_multiply(const bignum256 *k, bignum256 *x, const bignum256 *prime) // estimate (res / prime) coef = (res[i] >> 16) + (res[i + 1] << 14); // substract (coef * prime) from res - temp = 0x1000000000000000llu + res[i - 8] - prime->val[0] * (uint64_t)coef; + temp = 0x1000000000000000ull + res[i - 8] - prime->val[0] * (uint64_t)coef; res[i - 8] = temp & 0x3FFFFFFF; for (j = 1; j < 9; j++) { temp >>= 30; - temp += 0xFFFFFFFC0000000llu + res[i - 8 + j] - prime->val[j] * (uint64_t)coef; + temp += 0xFFFFFFFC0000000ull + res[i - 8 + j] - prime->val[j] * (uint64_t)coef; res[i - 8 + j] = temp & 0x3FFFFFFF; } } @@ -233,11 +233,11 @@ void bn_fast_mod(bignum256 *x, const bignum256 *prime) coef = x->val[8] >> 16; if (!coef) return; // substract (coef * prime) from x - temp = 0x1000000000000000llu + x->val[0] - prime->val[0] * (uint64_t)coef; + temp = 0x1000000000000000ull + x->val[0] - prime->val[0] * (uint64_t)coef; x->val[0] = temp & 0x3FFFFFFF; for (j = 1; j < 9; j++) { temp >>= 30; - temp += 0xFFFFFFFC0000000llu + x->val[j] - prime->val[j] * (uint64_t)coef; + temp += 0xFFFFFFFC0000000ull + x->val[j] - prime->val[j] * (uint64_t)coef; x->val[j] = temp & 0x3FFFFFFF; } }