Skip to content

Commit 6b9ae8c

Browse files
committed
Size can be negative after truncate or seek
1 parent 04372bd commit 6b9ae8c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_io/bytesio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ _io_BytesIO_peek_impl(bytesio *self, Py_ssize_t size)
530530
Py_ssize_t n = self->string_size - self->pos;
531531
if (size < 1 || size > n) {
532532
size = n;
533-
/* size can be negative after truncate() */
533+
/* size can be negative after truncate() or seek() */
534534
if (size < 0) {
535535
size = 0;
536536
}

0 commit comments

Comments
 (0)