From: Ilia Alshanetsky Date: Wed, 9 Jun 2004 14:39:33 +0000 (+0000) Subject: Fixed bug #28525 (gmp_powm() does not work with hexadecimal string modulo X-Git-Tag: php-5.0.0~244 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e638c84c0fbbaed5f6fecad0d96195343c40375;p=php Fixed bug #28525 (gmp_powm() does not work with hexadecimal string modulo represented as a string). Patch by: pickett at sumu dot org --- 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; }