mirror of
https://github.com/danog/phpseclib.git
synced 2024-11-30 04:39:21 +01:00
BigInteger: fix for (new BigInteger(48))->toString(true)
This commit is contained in:
parent
48e50fe8fa
commit
c63c223972
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user