mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-02 01:41:02 +02:00
Fix encoding of fixmap type.
The tag value was wrong, and a missing /binary flag caused an error.
This commit is contained in:
parent
57f0598373
commit
0cca90c21d
@ -168,7 +168,7 @@ unpack_array_(Bin, RestLen, RetList) when is_binary(Bin)->
|
|||||||
pack_map(M)->
|
pack_map(M)->
|
||||||
case dict:size(M) of
|
case dict:size(M) of
|
||||||
Len when Len < 16 ->
|
Len when Len < 16 ->
|
||||||
<< 2#1001:4, Len:4/integer-unit:1, (pack_map_(dict:to_list(M))) >>;
|
<< 2#1000:4, Len:4/integer-unit:1, (pack_map_(dict:to_list(M)))/binary >>;
|
||||||
Len when Len < 16#10000 -> % 65536
|
Len when Len < 16#10000 -> % 65536
|
||||||
<< 16#DE:8, Len:16/big-unsigned-integer-unit:1, (pack_map_(dict:to_list(M)))/binary >>;
|
<< 16#DE:8, Len:16/big-unsigned-integer-unit:1, (pack_map_(dict:to_list(M)))/binary >>;
|
||||||
Len ->
|
Len ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user