From b806ca3c2f4d6599388901f0b208584512f029dc Mon Sep 17 00:00:00 2001 From: toddouska Date: Tue, 16 Apr 2013 15:29:03 -0700 Subject: [PATCH] help compiler with fp_div cast to 32bit --- ctaocrypt/src/tfm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctaocrypt/src/tfm.c b/ctaocrypt/src/tfm.c index 0ae9a2a6c..a07ee198a 100644 --- a/ctaocrypt/src/tfm.c +++ b/ctaocrypt/src/tfm.c @@ -524,7 +524,7 @@ int fp_div(fp_int *a, fp_int *b, fp_int *c, fp_int *d) /* step 3.1 if xi == yt then set q{i-t-1} to b-1, * otherwise set q{i-t-1} to (xi*b + x{i-1})/yt */ if (x.dp[i] == y.dp[t]) { - q.dp[i - t - 1] = ((((fp_word)1) << DIGIT_BIT) - 1); + q.dp[i - t - 1] = (fp_digit) ((((fp_word)1) << DIGIT_BIT) - 1); } else { fp_word tmp; tmp = ((fp_word) x.dp[i]) << ((fp_word) DIGIT_BIT);