From 3e638c84c0fbbaed5f6fecad0d96195343c40375 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 9 Jun 2004 14:39:33 +0000 Subject: [PATCH] Fixed bug #28525 (gmp_powm() does not work with hexadecimal string modulo represented as a string). Patch by: pickett at sumu dot org --- ext/gmp/gmp.c | 3 +-- 1 file changed, 1 insertion(+), 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; } -- 2.40.0