summaryrefslogtreecommitdiff
path: root/mpz/powm_ui.c
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2000-06-06 20:06:44 +0200
committertege <tege@gmplib.org>2000-06-06 20:06:44 +0200
commit4547d564c045cbd7a6169aee1b010fb513a34eaa (patch)
tree2dc67093091c29a318e581dbd803462ad2b7056c /mpz/powm_ui.c
parentc163d6f39288c600661f08ae88c70339d4da7f72 (diff)
downloadgmp-4547d564c045cbd7a6169aee1b010fb513a34eaa.tar.gz
When exp is 0, change res assign order in order to handle argument overlap.
Diffstat (limited to 'mpz/powm_ui.c')
-rw-r--r--mpz/powm_ui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpz/powm_ui.c b/mpz/powm_ui.c
index efa13c4ec..34975fb31 100644
--- a/mpz/powm_ui.c
+++ b/mpz/powm_ui.c
@@ -57,8 +57,8 @@ mpz_powm_ui (res, base, exp, mod)
{
/* Exponent is zero, result is 1 mod MOD, i.e., 1 or 0
depending on if MOD equals 1. */
- rp[0] = 1;
res->_mp_size = (msize == 1 && (mod->_mp_d)[0] == 1) ? 0 : 1;
+ rp[0] = 1;
return;
}