Do not assume that vstr buf is the same after it was extended.
This commit is contained in:
parent
f2b796e7c7
commit
323c09e881
@ -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));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user