projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix segfault in retagging.
[u/mdw/catacomb]
/
mpbarrett-mexp.c
diff --git
a/mpbarrett-mexp.c
b/mpbarrett-mexp.c
index
4be854d
..
0338527
100644
(file)
--- a/
mpbarrett-mexp.c
+++ b/
mpbarrett-mexp.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id
: mpbarrett-mexp.c,v 1.3 2004/04/08 01:36:15 mdw Exp
$
+ * $Id$
*
* Multiple simultaneous exponentiations
*
*
* Multiple simultaneous exponentiations
*
@@
-63,10
+63,10
@@
mp *mpbarrett_mexp(mpbarrett *mb, mp *d, const mp_expfactor *f, size_t n)
for (i = 0; i < n; i++) {
if (f[i].exp->f & MP_BURN)
spare = MP_NEWSEC;
for (i = 0; i < n; i++) {
if (f[i].exp->f & MP_BURN)
spare = MP_NEWSEC;
- if (!(f[i].exp->f & MP_NEG))
- ff[i].base = MP_COPY(f[i].base);
- else
+ if (MP_NEGP(f[i].exp))
ff[i].base = mp_modinv(MP_NEW, f[i].base, mb->m);
ff[i].base = mp_modinv(MP_NEW, f[i].base, mb->m);
+ else
+ ff[i].base = MP_COPY(f[i].base);
ff[i].exp = f[i].exp;
}
mp_drop(g);
ff[i].exp = f[i].exp;
}
mp_drop(g);