Skip to content

Commit 827a785

Browse files
committed
Size can be negative after truncate or seek
1 parent a1504a7 commit 827a785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_io/bytesio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ _io_BytesIO_peek_impl(bytesio *self, Py_ssize_t size)
493493
Py_ssize_t n = self->string_size - self->pos;
494494
if (size < 1 || size > n) {
495495
size = n;
496-
/* size can be negative after truncate() */
496+
/* size can be negative after truncate() or seek() */
497497
if (size < 0) {
498498
size = 0;
499499
}

0 commit comments

Comments
 (0)