summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-04-29 17:04:33 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-04-29 17:04:33 (GMT)
commit19292d74bf125d60197fb9390b46ebb213e6d895 (patch)
treea2d724458614a794692e7ed8d9de6971cdc72c96 /generic
parente024894c53ffc2dec708a84210d4000e6a9c7209 (diff)
parentab5b2feda0ba89dbf619dce261b193bd953cf540 (diff)
downloadtcl-19292d74bf125d60197fb9390b46ebb213e6d895.zip
tcl-19292d74bf125d60197fb9390b46ebb213e6d895.tar.gz
tcl-19292d74bf125d60197fb9390b46ebb213e6d895.tar.bz2
merge trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIO.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index df863cc..0087526 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -3203,7 +3203,8 @@ Tcl_Close(
stickyError = 0;
- if ((statePtr->encoding != NULL) && (statePtr->curOutPtr != NULL)
+ if ((statePtr->encoding != NULL)
+ && !(statePtr->outputEncodingFlags & TCL_ENCODING_START)
&& (CheckChannelErrors(statePtr, TCL_WRITABLE) == 0)) {
statePtr->outputEncodingFlags |= TCL_ENCODING_END;
if (WriteChars(chanPtr, "", 0) < 0) {
@@ -7739,7 +7740,8 @@ Tcl_SetChannelOption(
* iso2022, the terminated escape sequence must write to the buffer.
*/
- if ((statePtr->encoding != NULL) && (statePtr->curOutPtr != NULL)
+ if ((statePtr->encoding != NULL)
+ && !(statePtr->outputEncodingFlags & TCL_ENCODING_START)
&& (CheckChannelErrors(statePtr, TCL_WRITABLE) == 0)) {
statePtr->outputEncodingFlags |= TCL_ENCODING_END;
WriteChars(chanPtr, "", 0);