mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
Do not assume that vstr buf is the same after it was extended.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user