Fix HEX encoding for very large numbers - issue #268
This commit is contained in:
parent
cede0cc410
commit
bd6e5f10af
@ -33,7 +33,7 @@ class IntegerFormatter implements IFormatter
|
|||||||
$digit = intval($arguments[1]);
|
$digit = intval($arguments[1]);
|
||||||
}
|
}
|
||||||
$bn = Utils::toBn($value);
|
$bn = Utils::toBn($value);
|
||||||
$bnHex = $bn->toHex(true);
|
$bnHex = $bn->toHex(Utils::isNegative($value));
|
||||||
$padded = mb_substr($bnHex, 0, 1);
|
$padded = mb_substr($bnHex, 0, 1);
|
||||||
|
|
||||||
if ($padded !== 'f') {
|
if ($padded !== 'f') {
|
||||||
|
Loading…
Reference in New Issue
Block a user