mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-27 04:34:45 +01:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
4548b45b9e
@ -539,7 +539,7 @@ class BigInteger
|
||||
$temp = $comparison < 0 ? $this->add(new static(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);
|
||||
}
|
||||
|
||||
|
@ -394,4 +394,13 @@ abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase
|
||||
$n = $this->getInstance(2);
|
||||
$x->powMod($e, $n);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group github1264
|
||||
*/
|
||||
public function test48ToHex()
|
||||
{
|
||||
$temp = $this->getInstance(48);
|
||||
$this->assertSame($temp->toHex(true), '30');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user