Skip to content

Commit 1603dbb

Browse files
authored
Merge pull request #6073 from prplz/msgpack-unpack-requires-readable
msgpack.unpack requires a readable stream
2 parents debe29c + 4bd6488 commit 1603dbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-module/msgpack/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,6 @@ void common_hal_msgpack_pack(mp_obj_t obj, mp_obj_t stream_obj, mp_obj_t default
497497
}
498498

499499
mp_obj_t common_hal_msgpack_unpack(mp_obj_t stream_obj, mp_obj_t ext_hook, bool use_list) {
500-
msgpack_stream_t stream = get_stream(stream_obj, MP_STREAM_OP_WRITE);
500+
msgpack_stream_t stream = get_stream(stream_obj, MP_STREAM_OP_READ);
501501
return unpack(&stream, ext_hook, use_list);
502502
}

0 commit comments

Comments
 (0)