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

support-3.5
Paul Sokolovsky 2016-03-24 19:43:08 +02:00
parent 24342dd65e
commit 4a02a8f74d
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}