summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2023-04-14 07:21:48 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2023-04-14 07:21:48 (GMT)
commitd3bb4906d1397f0b5adbeb1da10ce5f6c60a8c1e (patch)
treed23852e3e0698f2db488723ac5c4fcf3056a0e5a /generic/tclIO.c
parentf7c3a988274b5e8026bf4836028bfd6831e6a615 (diff)
downloadtcl-d3bb4906d1397f0b5adbeb1da10ce5f6c60a8c1e.zip
tcl-d3bb4906d1397f0b5adbeb1da10ce5f6c60a8c1e.tar.gz
tcl-d3bb4906d1397f0b5adbeb1da10ce5f6c60a8c1e.tar.bz2
Fix for [0cd1ae596e709259], under strict encoding, [gets] returns an error even
though a complete line is available.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index a1c13ac..aa82f89 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -4997,8 +4997,7 @@ Tcl_GetsObj(
}
UpdateInterest(chanPtr);
TclChannelRelease((Tcl_Channel)chanPtr);
- if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR) &&
- (copiedTotal == 0 || !GotFlag(statePtr, CHANNEL_NONBLOCKING))) {
+ if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR) && gs.bytesWrote == 0) {
Tcl_SetErrno(EILSEQ);
copiedTotal = -1;
}