diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 969c9ad6..32afa7a0 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -550,7 +550,7 @@ class Math_BigInteger $temp = $comparison < 0 ? $this->add(new Math_BigInteger(1)) : $this->copy(); $bytes = $temp->toBytes(); - if (empty($bytes)) { // eg. if the number we're trying to convert is -1 + if (!strlen($bytes)) { // eg. if the number we're trying to convert is -1 $bytes = chr(0); }