Commit d093324d52ee268d03e889c37a6277a64b4222c3

nijtmans 2019-03-26T11:34:06

leftover DIGIT() usage

diff --git a/bn_mp_get_double.c b/bn_mp_get_double.c
index 6a4f2a5..629eae3 100644
--- a/bn_mp_get_double.c
+++ b/bn_mp_get_double.c
@@ -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;
 }
diff --git a/bn_mp_is_square.c b/bn_mp_is_square.c
index c3c3872..1dd1d6c 100644
--- a/bn_mp_is_square.c
+++ b/bn_mp_is_square.c
@@ -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;
    }