Commit 323c09e8 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

Do not assume that vstr buf is the same after it was extended.

parent f2b796e7
......@@ -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));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment