From 47714441724d5579d844c9ef4730dda10f02d2c9 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 17 May 2003 20:03:22 +0000 Subject: [PATCH] (read_process_output): Back out change from 2003-03-09. --- src/process.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/process.c b/src/process.c index 6dc052e716b..9790b7d29a6 100644 --- a/src/process.c +++ b/src/process.c @@ -4463,18 +4463,18 @@ read_process_output (proc, channel) if (DATAGRAM_CHAN_P (channel)) { int len = datagram_address[channel].len; - nbytes = recvfrom (channel, chars + carryover, readmax, + nbytes = recvfrom (channel, chars + carryover, readmax - carryover, 0, datagram_address[channel].sa, &len); } else #endif if (proc_buffered_char[channel] < 0) - nbytes = emacs_read (channel, chars + carryover, readmax); + nbytes = emacs_read (channel, chars + carryover, readmax - carryover); else { chars[carryover] = proc_buffered_char[channel]; proc_buffered_char[channel] = -1; - nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1); + nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1 - carryover); if (nbytes < 0) nbytes = 1; else -- 2.39.5