diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-12-14 18:33:22 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-12-14 18:33:22 +0000 |
commit | 7eed8cd21310c35405a775396eff798b3b2d74e0 (patch) | |
tree | 19841ec7b912a040a0b42731ab82fd8a27368071 | |
parent | 2bdb8d4acd52db4402914a154f0ecb42b5752f94 (diff) |
(pty_io_read): When copying TIOCPKT_DATA; account for size correctly.
-rw-r--r-- | term/ptyio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/term/ptyio.c b/term/ptyio.c index 22a0531e..cd8f1261 100644 --- a/term/ptyio.c +++ b/term/ptyio.c @@ -315,7 +315,10 @@ pty_io_read (struct trivfs_protid *cred, char *cp = *data; if (packet_mode || user_ioctl_mode) - *cp++ = TIOCPKT_DATA; + { + *cp++ = TIOCPKT_DATA; + --size; + } while (size--) *cp++ = dequeue (outputq); } |