Squared result was stored in the wrong variable
This commit is contained in:
parent
921be35779
commit
e071a03b63
@ -38,7 +38,7 @@ int mp_expt_d (mp_int * a, mp_digit b, mp_int * c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* square */
|
/* square */
|
||||||
if (b > 1 && (res = mp_sqr (c, c)) != MP_OKAY) {
|
if (b > 1 && (res = mp_sqr (&g, &g)) != MP_OKAY) {
|
||||||
mp_clear (&g);
|
mp_clear (&g);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user