This commit is contained in:
Dan 2018-04-09 11:04:07 +00:00 committed by GitHub
commit 3b18a3b3b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ class IntegerFormatter implements IFormatter
$digit = intval($arguments[1]);
}
$bn = Utils::toBn($value);
$bnHex = $bn->toHex(true);
$bnHex = $bn->toHex($bn->is_negative);
$padded = mb_substr($bnHex, 0, 1);
if ($padded !== 'f') {
@ -41,4 +41,4 @@ class IntegerFormatter implements IFormatter
}
return implode('', array_fill(0, $digit-mb_strlen($bnHex), $padded)) . $bnHex;
}
}
}