diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-12-09 10:22:11 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-12-09 10:22:11 (GMT) |
| commit | 768fa22c43bfd6228f6e09e81dfebed70c1a9244 (patch) | |
| tree | 62c92a9ed5651de2fe24e7e18ec91f5a037e3c14 | |
| parent | a58f5f14b0e37a49c40550868cbe53b0c6757d5a (diff) | |
| download | tcl-768fa22c43bfd6228f6e09e81dfebed70c1a9244.zip tcl-768fa22c43bfd6228f6e09e81dfebed70c1a9244.tar.gz tcl-768fa22c43bfd6228f6e09e81dfebed70c1a9244.tar.bz2 | |
Partial solution for [b8f575aa23]. Still missing: 1) testcases. 2) What if both EOF and ENCODING_ERROR happens (because there is both an eofchar and an invalid byte in the stream)
| -rw-r--r-- | generic/tclIO.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 8e4ecee..afe6aec 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -7588,7 +7588,7 @@ Tcl_Eof( ChannelState *statePtr = ((Channel *) chan)->state; /* State of real channel structure. */ - return GotFlag(statePtr, CHANNEL_EOF) ? 1 : 0; + return (GotFlag(statePtr, CHANNEL_EOF) && !GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) ? 1 : 0; } /* |
