summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--py/stream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/stream.c b/py/stream.c
index e70d365681..0e2cccad33 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -88,6 +88,7 @@ static mp_obj_t stream_readall(mp_obj_t self_in) {
}
}
vstr_set_size(vstr, total_size + 1); // TODO: for \0
+ buf = vstr_str(vstr);
buf[total_size] = 0;
return mp_obj_new_str(qstr_from_str_take(buf, total_size + 1));
}