mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 04:52:59 +01:00
Fix bug on unpacking empty array.
This commit is contained in:
parent
b8aa93ce30
commit
ae1b06f20b
@ -487,7 +487,7 @@ int msgpack_unserialize_array(
|
||||
|
||||
array_init(*obj);
|
||||
|
||||
unpack->stack[unpack->deps++] = count;
|
||||
if (count) unpack->stack[unpack->deps++] = count;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -507,7 +507,7 @@ int msgpack_unserialize_map(
|
||||
{
|
||||
MSGPACK_UNSERIALIZE_ALLOC_VALUE(unpack);
|
||||
|
||||
unpack->stack[unpack->deps++] = count;
|
||||
if (count) unpack->stack[unpack->deps++] = count;
|
||||
|
||||
unpack->type = MSGPACK_SERIALIZE_TYPE_NONE;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user