Skip to content
Snippets Groups Projects
Commit 4a02a8f7 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

py/stream: Fix object vs ptr usecase in mp_stream_writeall().

parent 24342dd6
No related branches found
No related tags found
No related merge requests found
......@@ -213,7 +213,7 @@ mp_uint_t mp_stream_writeall(mp_obj_t stream, const byte *buf, mp_uint_t size, i
mp_obj_base_t* s = (mp_obj_base_t*)MP_OBJ_TO_PTR(stream);
mp_uint_t sz = size;
while (sz > 0) {
mp_uint_t out_sz = s->type->stream_p->write(s, buf, size, errcode);
mp_uint_t out_sz = s->type->stream_p->write(stream, buf, size, errcode);
if (out_sz == MP_STREAM_ERROR) {
return MP_STREAM_ERROR;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment