summaryrefslogtreecommitdiff
path: root/ext/gmp
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-06-09 14:39:33 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-06-09 14:39:33 +0000
commit3e638c84c0fbbaed5f6fecad0d96195343c40375 (patch)
tree22170ab79ba0d006343e074382589f4571f68013 /ext/gmp
parentccc580f408c5f3fc09e95318a7e2a4e816d7e986 (diff)
downloadphp-git-3e638c84c0fbbaed5f6fecad0d96195343c40375.tar.gz
Fixed bug #28525 (gmp_powm() does not work with hexadecimal string modulo
represented as a string). Patch by: pickett at sumu dot org
Diffstat (limited to 'ext/gmp')
-rw-r--r--ext/gmp/gmp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index 08633ceba6..f41b4063e3 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -842,8 +842,7 @@ ZEND_FUNCTION(gmp_powm)
}
FETCH_GMP_ZVAL(gmpnum_mod, mod_arg);
- convert_to_long_ex(mod_arg);
- if (!Z_LVAL_PP(mod_arg)) {
+ if (!mpz_cmp_ui(*gmpnum_mod, 0)) {
RETURN_FALSE;
}