diff options
| author | Paul Sokolovsky | 2014-07-23 00:23:44 +0300 |
|---|---|---|
| committer | Paul Sokolovsky | 2014-07-23 00:23:44 +0300 |
| commit | e1b1abc1e830b674ab0e773ae5cec414ed0dbee1 (patch) | |
| tree | 4d4ff05cd296702da4eb407cda6279f1f0940e42 /py/stream.c | |
| parent | de993f457385cd47fbad8d95569da58679a632d6 (diff) | |
stream: Revert to checking for the correct error value.
Diffstat (limited to 'py/stream.c')
| -rw-r--r-- | py/stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/stream.c b/py/stream.c index 5b5fa90df..5e65f79ba 100644 --- a/py/stream.c +++ b/py/stream.c @@ -97,7 +97,7 @@ STATIC mp_obj_t stream_read(uint n_args, const mp_obj_t *args) { } int error; mp_int_t out_sz = o->type->stream_p->read(o, p, more_bytes, &error); - if (out_sz < 0) { + if (out_sz == -1) { vstr_cut_tail_bytes(&vstr, more_bytes); if (is_nonblocking_error(error)) { // With non-blocking streams, we read as much as we can. |
