summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-01-02 22:42:12 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-01-02 22:42:12 (GMT)
commitf16ec6e776a225afc140af0387b7819427358ba3 (patch)
tree79010bc24f9c7b7c4383f2bb4f857c1556857286
parent5cd16427f7764b47e4fc95b7c81a78076df98652 (diff)
downloadtcl-f16ec6e776a225afc140af0387b7819427358ba3.zip
tcl-f16ec6e776a225afc140af0387b7819427358ba3.tar.gz
tcl-f16ec6e776a225afc140af0387b7819427358ba3.tar.bz2
Now that we're using TCL_ENCODING_NO_TERMINATE - be careful about acting on
the contents of dst -- they could be leftovers. Only check bytes reported to have been written and take care to get the assertions right.
-rw-r--r--generic/tclIO.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 9bbf2a6..a9091af 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -6198,9 +6198,8 @@ ReadChars(
* empty string.
*/
- if (dst[0] == '\n') {
+ if (dstRead == 1 && dst[0] == '\n') {
assert(statePtr->inputTranslation == TCL_TRANSLATE_AUTO);
- assert(dstRead == 1);
goto consume;
}