diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 4b116ec7..ed28c78c 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -445,6 +445,9 @@ class BigInteger // (?<=^|-)0*: find any 0's that are preceded by the start of the string or by a - (ie. octals) // [^-0-9].*: find any non-numeric characters and then any characters that follow that $x = preg_replace('#(?getInstance(48); $this->assertSame($temp->toHex(true), '30'); } + + public function testZeroBase10() + { + $temp = $this->getInstance('00'); + $this->assertSame($temp->toString(), '0'); + } }