# HG changeset patch # User David Kastrup # Date 1053201802 0 # Node ID 2c49296df7d39876b33b887828c3735ae599fc1e # Parent 2d746ed41a7cdcb655acfc7f240cfb7bfe6d1c80 (read_process_output): Back out change from 2003-03-09. diff -r 2d746ed41a7c -r 2c49296df7d3 src/process.c --- a/src/process.c Sat May 17 20:02:55 2003 +0000 +++ b/src/process.c Sat May 17 20:03:22 2003 +0000 @@ -4463,18 +4463,18 @@ 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