Skip to content

Commit c71d252

Browse files
committed
gh-146589: Fix raw buffer merge in UnixConsole.getpending()
When coalescing queued input events, append e2.raw to e.raw instead of duplicating e.raw (e.raw += e.raw was incorrect).
1 parent 6932c3e commit c71d252

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/_pyrepl/unix_console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ def getpending(self):
542542
while not self.event_queue.empty():
543543
e2 = self.event_queue.get()
544544
e.data += e2.data
545-
e.raw += e.raw
545+
e.raw += e2.raw
546546

547547
amount = struct.unpack("i", ioctl(self.input_fd, FIONREAD, b"\0\0\0\0"))[0]
548548
trace("getpending({a})", a=amount)

0 commit comments

Comments
 (0)