stream: readall(): Make sure there's a trailing NUL char.

This commit is contained in:
Paul Sokolovsky 2015-01-24 00:22:47 +02:00
parent 66b060f3e6
commit ca3dbb8d8b
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}