From: Sean Bright Date: Sun, 10 Feb 2002 23:19:38 +0000 (+0000) Subject: '0b' could be the beginning of a hex string (without leading '0x') so if X-Git-Tag: php-4.2.0RC1~374 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6829710dceb0d39a06b7560a493a462e7504657b;p=php '0b' could be the beginning of a hex string (without leading '0x') so if the user specifies base 16, use that instead. --- diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index c20f2ac3a3..fc90d6c6f4 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -214,7 +214,7 @@ static int convert_to_gmp(mpz_t * *gmpnumber, zval **val, int base) if (numstr[1] == 'x' || numstr[1] == 'X') { base = 16; skip_lead = 1; - } else if (numstr[1] == 'b' || numstr[1] == 'B') { + } else if (base != 16 && (numstr[1] == 'b' || numstr[1] == 'B')) { base = 2; skip_lead = 1; }