diff options
Diffstat (limited to 'mpi/mpiutil.c')
-rw-r--r-- | mpi/mpiutil.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mpi/mpiutil.c b/mpi/mpiutil.c index 752ce7f84..4e2a09056 100644 --- a/mpi/mpiutil.c +++ b/mpi/mpiutil.c @@ -265,6 +265,7 @@ mpi_copy( MPI a ) b = mpi_alloc( a->nlimbs ); #endif b->nlimbs = a->nlimbs; + b->sign = a->sign; for(i=0; i < b->nlimbs; i++ ) b->d[i] = a->d[i]; } @@ -318,9 +319,9 @@ mpi_alloc_set_ui( unsigned long u) void mpi_swap( MPI a, MPI b) { - MPI x; + struct mpi_struct tmp; - x = a; a = b; b = x; + tmp = *a; *a = *b; *b = tmp; } |