diff options
Diffstat (limited to 'lib/freebl/mpi/mpi.c')
-rw-r--r-- | lib/freebl/mpi/mpi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/freebl/mpi/mpi.c b/lib/freebl/mpi/mpi.c index bc4c148d6..2e6cd8466 100644 --- a/lib/freebl/mpi/mpi.c +++ b/lib/freebl/mpi/mpi.c @@ -2520,12 +2520,6 @@ mp_read_raw(mp_int *mp, char *str, int len) mp_zero(mp); - /* Get sign from first byte */ - if (ustr[0]) - SIGN(mp) = NEG; - else - SIGN(mp) = ZPOS; - /* Read the rest of the digits */ for (ix = 1; ix < len; ix++) { if ((res = mp_mul_d(mp, 256, mp)) != MP_OKAY) @@ -2534,6 +2528,12 @@ mp_read_raw(mp_int *mp, char *str, int len) return res; } + /* Get sign from first byte */ + if (ustr[0]) + SIGN(mp) = NEG; + else + SIGN(mp) = ZPOS; + return MP_OKAY; } /* end mp_read_raw() */ |