Skip to content

Commit d9948c8

Browse files
Update Modules/_io/bytesio.c
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
1 parent 9cdd231 commit d9948c8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/_io/bytesio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,9 @@ _io_BytesIO_peek_impl(bytesio *self, Py_ssize_t size)
493493
n = self->string_size - self->pos;
494494
if (size < 1 || size > n) {
495495
size = n;
496-
if (size < 0)
496+
if (size < 0) {
497497
size = 0;
498+
}
498499
}
499500
return peek_bytes(self, size);
500501
}

0 commit comments

Comments
 (0)