Merge pull request #185 from libtom/leftover_digit_macro

leftover DIGIT() usage
This commit is contained in:
Steffen Jaeckel 2019-03-26 14:27:42 +01:00 committed by GitHub
commit 810826d78d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ double mp_get_double(const mp_int *a)
fac *= 2.0;
}
for (i = a->used; i --> 0;) {
d = (d * fac) + (double)DIGIT(a, i);
d = (d * fac) + (double)a->dp[i];
}
return (a->sign == MP_NEG) ? -d : d;
}

View File

@ -54,7 +54,7 @@ int mp_is_square(const mp_int *arg, int *ret)
}
/* First check mod 128 (suppose that DIGIT_BIT is at least 7) */
if (rem_128[127u & DIGIT(arg, 0)] == (char)1) {
if (rem_128[127u & arg->dp[0]] == (char)1) {
return MP_OKAY;
}