summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-03-24 19:43:08 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-03-24 19:43:08 +0200
commit4a02a8f74ddec92369d8bf2bd51e4191d0d42c5c (patch)
tree2c12baede941ad5f1b11826460bdc25c4c46f690
parent24342dd65efc34d0f89c1a87b9a793d1299538e1 (diff)
downloadmicropython-4a02a8f74ddec92369d8bf2bd51e4191d0d42c5c.tar.gz
micropython-4a02a8f74ddec92369d8bf2bd51e4191d0d42c5c.zip
py/stream: Fix object vs ptr usecase in mp_stream_writeall().
-rw-r--r--py/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/stream.c b/py/stream.c
index abc973d9e5..8216596a13 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -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;
}