BigInteger: fix for (new BigInteger(48))->toString(true)

This commit is contained in:
terrafrost 2018-04-09 23:47:38 -05:00
parent 48e50fe8fa
commit c63c223972

View File

@ -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);
}