summaryrefslogtreecommitdiff
path: root/mpi/mpiutil.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1997-11-19 13:12:21 +0000
committerWerner Koch <wk@gnupg.org>1997-11-19 13:12:21 +0000
commitf6b6e3639a266f1bb56cdc05a3a3307a19abafe0 (patch)
tree20405936a7ceed003631b7f4621fab4f0915dcf9 /mpi/mpiutil.c
parent4b5e71ca4e84e61e595dec19e1c7cab0c0a73f24 (diff)
downloadlibgcrypt-f6b6e3639a266f1bb56cdc05a3a3307a19abafe0.tar.gz
Output armor works, RSA keygen works.
Diffstat (limited to 'mpi/mpiutil.c')
-rw-r--r--mpi/mpiutil.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mpi/mpiutil.c b/mpi/mpiutil.c
index 752ce7f8..4e2a0905 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;
}