diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 36e6ce99..0f60b8a9 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -445,7 +445,7 @@ 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('00'); $this->assertSame($temp->toString(), '0'); + + $temp = $this->getInstance('-0'); + $this->assertSame($temp->toString(), '0'); } }