Fix mp_add_d()

This closes #64
This commit is contained in:
Dmitry Kovalenko 2016-06-02 09:40:55 +02:00 committed by Steffen Jaeckel
parent 0b9e9b5b08
commit 62442d4f33
1 changed files with 3 additions and 3 deletions

View File

@ -49,9 +49,6 @@ mp_add_d (mp_int * a, mp_digit b, mp_int * c)
/* old number of used digits in c */
oldused = c->used;
/* sign always positive */
c->sign = MP_ZPOS;
/* source alias */
tmpa = a->dp;
@ -96,6 +93,9 @@ mp_add_d (mp_int * a, mp_digit b, mp_int * c)
ix = 1;
}
/* sign always positive */
c->sign = MP_ZPOS;
/* now zero to oldused */
while (ix++ < oldused) {
*tmpc++ = 0;