summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/stream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/stream.c b/py/stream.c
index 921459a8d..b4ce1081b 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -289,6 +289,7 @@ STATIC mp_obj_t stream_readall(mp_obj_t self_in) {
}
vstr.len = total_size;
+ vstr.buf[total_size] = '\0';
return mp_obj_new_str_from_vstr(STREAM_CONTENT_TYPE(o->type->stream_p), &vstr);
}