Skip to content

Commit 323c09e

Browse files
committed
Do not assume that vstr buf is the same after it was extended.
1 parent f2b796e commit 323c09e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

py/stream.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ static mp_obj_t stream_readall(mp_obj_t self_in) {
8888
}
8989
}
9090
vstr_set_size(vstr, total_size + 1); // TODO: for \0
91+
buf = vstr_str(vstr);
9192
buf[total_size] = 0;
9293
return mp_obj_new_str(qstr_from_str_take(buf, total_size + 1));
9394
}

0 commit comments

Comments
 (0)