Skip to content
Snippets Groups Projects
Commit 4ecb700f authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

streams: Treat non-error output size as unsigned.

parent e1b1abc1
No related branches found
No related tags found
No related merge requests found
......@@ -113,7 +113,7 @@ STATIC mp_obj_t stream_read(uint n_args, const mp_obj_t *args) {
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError, "[Errno %d]", error));
}
if (out_sz < more_bytes) {
if ((mp_uint_t)out_sz < more_bytes) {
// Finish reading.
// TODO what if we have read only half a non-ASCII char?
vstr_cut_tail_bytes(&vstr, more_bytes - out_sz);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment