Skip to content

Commit 4a02a8f

Browse files
committed
py/stream: Fix object vs ptr usecase in mp_stream_writeall().
1 parent 24342dd commit 4a02a8f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ mp_uint_t mp_stream_writeall(mp_obj_t stream, const byte *buf, mp_uint_t size, i
213213
mp_obj_base_t* s = (mp_obj_base_t*)MP_OBJ_TO_PTR(stream);
214214
mp_uint_t sz = size;
215215
while (sz > 0) {
216-
mp_uint_t out_sz = s->type->stream_p->write(s, buf, size, errcode);
216+
mp_uint_t out_sz = s->type->stream_p->write(stream, buf, size, errcode);
217217
if (out_sz == MP_STREAM_ERROR) {
218218
return MP_STREAM_ERROR;
219219
}

0 commit comments

Comments
 (0)