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)
commita2fb498f19ef2cc63056bb932b942f0c1c407e93 (patch)
treea2d724458614a794692e7ed8d9de6971cdc72c96 /generic
parent4119a864755c221944bcd1967b8243a2acc3d9aa (diff)
parentb648be8b339531ac4f5f2aadd42094bccaa7b758 (diff)
downloadtcl-a2fb498f19ef2cc63056bb932b942f0c1c407e93.zip
tcl-a2fb498f19ef2cc63056bb932b942f0c1c407e93.tar.gz
tcl-a2fb498f19ef2cc63056bb932b942f0c1c407e93.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);