Permalink
Browse files

Squared result was stored in the wrong variable

  • Loading branch information...
1 parent 921be35 commit e071a03b630f8c790a5dde434fdcc3f8f84a5a3b @dbussink dbussink committed Mar 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 bn_mp_expt_d.c
View
@@ -38,7 +38,7 @@ int mp_expt_d (mp_int * a, mp_digit b, mp_int * c)
}
/* square */
- if (b > 1 && (res = mp_sqr (c, c)) != MP_OKAY) {
+ if (b > 1 && (res = mp_sqr (&g, &g)) != MP_OKAY) {
mp_clear (&g);
return res;
}

0 comments on commit e071a03

Please sign in to comment.