stream: readall(): Make sure there's a trailing NUL char.
This commit is contained in:
parent
66b060f3e6
commit
ca3dbb8d8b
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue