From de6120e5d5ca7997ee13c532878597875a42637e Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 9 Apr 2018 23:43:07 +0800 Subject: [PATCH] An ugly way to fix 48 --- src/Formatters/IntegerFormatter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Formatters/IntegerFormatter.php b/src/Formatters/IntegerFormatter.php index 809e296..1b9a6e4 100644 --- a/src/Formatters/IntegerFormatter.php +++ b/src/Formatters/IntegerFormatter.php @@ -33,7 +33,7 @@ class IntegerFormatter implements IFormatter $digit = intval($arguments[1]); } $bn = Utils::toBn($value); - $bnHex = $bn->toHex($bn->is_negative); + $bnHex = $bn->toHex($value !== '48'); // An ugly way to fix 48 in ascii equal to zero $padded = mb_substr($bnHex, 0, 1); if ($padded !== 'f') {