summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2004-02-02 21:31:21 (GMT)
committerdavygrvy <davygrvy@pobox.com>2004-02-02 21:31:21 (GMT)
commit68701e8b8d6e8074bc4fb90b0fd013d2b4c06d03 (patch)
treea63551d87292229c9dd6f8d41cc9955519278037 /generic/tclIO.c
parent90df62b250b6b243f717cedebfd659b964a94714 (diff)
downloadtcl-68701e8b8d6e8074bc4fb90b0fd013d2b4c06d03.zip
tcl-68701e8b8d6e8074bc4fb90b0fd013d2b4c06d03.tar.gz
tcl-68701e8b8d6e8074bc4fb90b0fd013d2b4c06d03.tar.bz2
* generic/tclIO.c (Tcl_Ungets): fixed improper filling of the channel buffer.
[Bug 405995]
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 527d697..09ebdba 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIO.c,v 1.69 2003/12/24 04:18:19 davygrvy Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.70 2004/02/02 21:31:21 davygrvy Exp $
*/
#include "tclInt.h"
@@ -5054,9 +5054,8 @@ Tcl_Ungets(chan, str, len, atEnd)
bufPtr = AllocChannelBuffer(len);
for (i = 0; i < len; i++) {
- bufPtr->buf[i] = str[i];
+ bufPtr->buf[bufPtr->nextAdded++] = str[i];
}
- bufPtr->nextAdded += len;
if (statePtr->inQueueHead == (ChannelBuffer *) NULL) {
bufPtr->nextPtr = (ChannelBuffer *) NULL;