1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-30 04:39:02 +01:00

BigInteger: fix previous fix

This commit is contained in:
terrafrost 2014-08-10 14:47:08 -05:00
parent 4ce7a0f63a
commit 33182bb2de

View File

@ -2904,7 +2904,7 @@ class Math_BigInteger
$leading_ones = chr((1 << ($new_bits & 0x7)) - 1) . str_repeat(chr(0xFF), $new_bits >> 3);
$this->_base256_lshift($leading_ones, $current_bits);
$temp = str_pad($temp, ceil(strlen($temp) / 8), chr(0), STR_PAD_LEFT);
$temp = str_pad($temp, strlen($leading_ones), chr(0), STR_PAD_LEFT);
return $this->_normalize(new Math_BigInteger($leading_ones | $temp, 256));
}