diff options
author | dgp <dgp@users.sourceforge.net> | 2015-01-02 22:42:12 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-01-02 22:42:12 (GMT) |
commit | 5838bb0d358ae87c8a642e68625dc70d3b4f8e70 (patch) | |
tree | 79010bc24f9c7b7c4383f2bb4f857c1556857286 | |
parent | c826f6d268355204eeef4506cec6a8948cc290a3 (diff) | |
download | tcl-5838bb0d358ae87c8a642e68625dc70d3b4f8e70.zip tcl-5838bb0d358ae87c8a642e68625dc70d3b4f8e70.tar.gz tcl-5838bb0d358ae87c8a642e68625dc70d3b4f8e70.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.c | 3 |
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; } |