diff options
author | dgp <dgp@users.sourceforge.net> | 2014-04-29 17:04:33 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-04-29 17:04:33 (GMT) |
commit | a2fb498f19ef2cc63056bb932b942f0c1c407e93 (patch) | |
tree | a2d724458614a794692e7ed8d9de6971cdc72c96 /generic | |
parent | 4119a864755c221944bcd1967b8243a2acc3d9aa (diff) | |
parent | b648be8b339531ac4f5f2aadd42094bccaa7b758 (diff) | |
download | tcl-a2fb498f19ef2cc63056bb932b942f0c1c407e93.zip tcl-a2fb498f19ef2cc63056bb932b942f0c1c407e93.tar.gz tcl-a2fb498f19ef2cc63056bb932b942f0c1c407e93.tar.bz2 |
merge trunk
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclIO.c | 6 |
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); |