summaryrefslogtreecommitdiffstats
path: root/mpi
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-04-28 06:51:49 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-04-28 06:51:49 -0700
commit2523921a66ae7fbf9c03e69552141fbbead5b1df (patch)
tree4864611cd5b8b260cf83f3b4bc5139b2b838c801 /mpi
parent0c18458bd242489babcd9a1aee30ba9fd0620e25 (diff)
downloadtxr-2523921a66ae7fbf9c03e69552141fbbead5b1df.tar.gz
txr-2523921a66ae7fbf9c03e69552141fbbead5b1df.tar.bz2
txr-2523921a66ae7fbf9c03e69552141fbbead5b1df.zip
Fix broken bignum to uint_ptr_t conversion.
This applies only to some platforms, none of which are current targets on which TXR is tested and released. * mpi/mpi.c (mp_get_uinptr): Do not clobber output accumulator in the loop body: the bits must be OR-ed into it.
Diffstat (limited to 'mpi')
-rw-r--r--mpi/mpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpi/mpi.c b/mpi/mpi.c
index f58e9e68..96dc71d4 100644
--- a/mpi/mpi.c
+++ b/mpi/mpi.c
@@ -594,7 +594,7 @@ mp_err mp_get_uintptr(mp_int *mp, uint_ptr_t *z)
int ix;
int nd = USED(mp);
for (ix = 0; ix < nd; ix++, out <<= MP_DIGIT_BIT)
- out = DIGIT(mp, ix);
+ out |= DIGIT(mp, ix);
#else
out = DIGIT(mp, 0);
#endif