summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-11-28 16:04:31 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-11-28 16:04:31 (GMT)
commite5d536c1d7d013348751b3d4b691d1fa772fe65a (patch)
treecabed87884364e8149d58283abf02c1ff2b0c668 /generic/tclIO.c
parent924f22e2d958a5cc50eff2cd98862bf2270353b3 (diff)
downloadtcl-e5d536c1d7d013348751b3d4b691d1fa772fe65a.zip
tcl-e5d536c1d7d013348751b3d4b691d1fa772fe65a.tar.gz
tcl-e5d536c1d7d013348751b3d4b691d1fa772fe65a.tar.bz2
* generic/tclIO.c: Simplify test and improve accuracy of error
message in latest changes.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 886a08e..5acef55 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIO.c,v 1.131 2007/11/28 01:11:52 patthoyts Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.132 2007/11/28 16:04:31 dgp Exp $
*/
#include "tclInt.h"
@@ -7318,11 +7318,10 @@ Tcl_SetChannelOption(
int outIndex = (argc - 1);
int inValue = (int) argv[0][0];
int outValue = (int) argv[outIndex][0];
- if ((inValue < 0 || inValue > 0x7f) || (outValue < 0 || outValue > 0x7f)) {
+ if (inValue & 0x80 || outValue & 0x80) {
if (interp) {
- Tcl_AppendResult(interp,
- "bad value for -eofchar: must be between 0 and 0x7f",
- NULL);
+ Tcl_AppendResult(interp, "bad value for -eofchar: ",
+ "must be non-NUL ASCII character", NULL);
}
ckfree((char *) argv);
return TCL_ERROR;