From 6829710dceb0d39a06b7560a493a462e7504657b Mon Sep 17 00:00:00 2001 From: Sean Bright Date: Sun, 10 Feb 2002 23:19:38 +0000 Subject: [PATCH] '0b' could be the beginning of a hex string (without leading '0x') so if the user specifies base 16, use that instead. --- ext/gmp/gmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.40.0