diff --git a/shared-module/msgpack/__init__.c b/shared-module/msgpack/__init__.c index 7a6892c51f..e1b98a9f93 100644 --- a/shared-module/msgpack/__init__.c +++ b/shared-module/msgpack/__init__.c @@ -497,6 +497,6 @@ void common_hal_msgpack_pack(mp_obj_t obj, mp_obj_t stream_obj, mp_obj_t default } mp_obj_t common_hal_msgpack_unpack(mp_obj_t stream_obj, mp_obj_t ext_hook, bool use_list) { - msgpack_stream_t stream = get_stream(stream_obj, MP_STREAM_OP_WRITE); + msgpack_stream_t stream = get_stream(stream_obj, MP_STREAM_OP_READ); return unpack(&stream, ext_hook, use_list); }