We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cab65d commit fb221a8Copy full SHA for fb221a8
1 file changed
src/msgpack_packer.erl
@@ -98,13 +98,13 @@ pack(Other, _) ->
98
pack_int(N) when N >= -32->
99
<< 2#111:3, N:5 >>;
100
%% int 8
101
-pack_int(N) when N > -128 ->
+pack_int(N) when N >= -128 ->
102
<< 16#D0:8, N:8/big-signed-integer-unit:1 >>;
103
%% int 16
104
-pack_int(N) when N > -32768 ->
+pack_int(N) when N >= -16#8000 ->
105
<< 16#D1:8, N:16/big-signed-integer-unit:1 >>;
106
%% int 32
107
-pack_int(N) when (N band 16#FFFFFFFF) =:= N ->
+pack_int(N) when N >= -16#80000000 ->
108
<< 16#D2:8, N:32/big-signed-integer-unit:1 >>;
109
%% int 64
110
pack_int(N) when N >= -16#8000000000000000 ->
0 commit comments