Overview
| Artifact ID: | 46a22ff0c88ece7a6614894f50a6259bbbe3a8a7 |
|---|---|
| Ticket: | 405995ffffffffffffffffffffffffffffffffff
Tcl_Ungets filling buffer wrongly |
| User & Date: | jiangwu on 2004-02-03 02:41:54 |
Changes
- icomment:
Logged In: YES user_id=966384 I tried this patch on 8.4.4 and it seems to work. Here is the diff against 8.4.4: cvs diff -u tclIO.c Index: tclIO.c ============================================== ===================== RCS file: /home/cvs/starvine/cvsroot/tcl/generic/tclIO.c,v retrieving revision 1.2 diff -u -r1.2 tclIO.c --- tclIO.c 11 Oct 2003 07:02:47 -0000 1.2 +++ tclIO.c 2 Feb 2004 19:36:55 -0000 @@ -5041,9 +5041,8 @@ 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; - login: "jiangwu"
- mimetype: "text/plain"
- username: "jiangwu"