]> granicus.if.org Git - php/commitdiff
Fixed bug #28525 (gmp_powm() does not work with hexadecimal string modulo
authorIlia Alshanetsky <iliaa@php.net>
Wed, 9 Jun 2004 14:39:33 +0000 (14:39 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 9 Jun 2004 14:39:33 +0000 (14:39 +0000)
represented as a string).
Patch by: pickett at sumu dot org

ext/gmp/gmp.c

index 08633ceba61655594dabcda4d444d8db24cec2d6..f41b4063e31e5c2fd7f3ed4281e72d7cc6c8bf18 100644 (file)
@@ -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;
        }