From 4e06ab52dd71d7c3c74036d244861a483c898604 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 5 Mar 2013 08:29:06 -0600 Subject: [PATCH] BigInteger: revamp base-10 regex new Math_BigInteger('-09') gave 0 back as a number in GMP mode --- phpseclib/Math/BigInteger.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index c1e239cb..e818e8bb 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -413,7 +413,10 @@ class Math_BigInteger { break; case 10: case -10: - $x = preg_replace('#^(-?[0-9]*).*#', '$1', $x); + // (?