Merge de6120e5d5
into 00817ee6b9
This commit is contained in:
commit
340d7614e0
@ -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($value !== '48'); // An ugly way to fix 48 in ascii equal to zero
|
||||||
$padded = mb_substr($bnHex, 0, 1);
|
$padded = mb_substr($bnHex, 0, 1);
|
||||||
|
|
||||||
if ($padded !== 'f') {
|
if ($padded !== 'f') {
|
||||||
@ -41,4 +41,4 @@ class IntegerFormatter implements IFormatter
|
|||||||
}
|
}
|
||||||
return implode('', array_fill(0, $digit-mb_strlen($bnHex), $padded)) . $bnHex;
|
return implode('', array_fill(0, $digit-mb_strlen($bnHex), $padded)) . $bnHex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user