Skip to content

Commit 26d1e81

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

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
@@ -530,8 +530,9 @@ _io_BytesIO_peek_impl(bytesio *self, Py_ssize_t size)
530530
n = self->string_size - self->pos;
531531
if (size < 1 || size > n) {
532532
size = n;
533-
if (size < 0)
533+
if (size < 0) {
534534
size = 0;
535+
}
535536
}
536537
return peek_bytes_lock_held(self, size);
537538
}

0 commit comments

Comments
 (0)