summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclIO.c2
-rw-r--r--generic/tclInt.h2
-rw-r--r--win/tclWinConsole.c11
3 files changed, 9 insertions, 6 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index f0d4c9e..7af6aa0 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -7711,7 +7711,7 @@ Tcl_BadChannelOption(
}
Tcl_ResetResult(interp);
errObj = Tcl_ObjPrintf("bad option \"%s\": should be one of ",
- optionName);
+ optionName ? optionName : "");
argc--;
for (i = 0; i < argc; i++) {
Tcl_AppendPrintfToObj(errObj, "-%s, ", argv[i]);
diff --git a/generic/tclInt.h b/generic/tclInt.h
index dcac9e8..3018d98 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -1734,7 +1734,7 @@ typedef struct Command {
#define CMD_COMPILES_EXPANDED 0x08
#define CMD_REDEF_IN_PROGRESS 0x10
#define CMD_VIA_RESOLVER 0x20
-#define CMD_DEAD 0x30
+#define CMD_DEAD 0x40
/*
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index 8b1b2da..3b8753b 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -1527,11 +1527,14 @@ ConsoleSetOptionProc(
} else {
infoPtr->flags |= CONSOLE_RESET;
}
- } else if (len > 0) {
- return Tcl_BadChannelOption(interp, optionName,
- (infoPtr->flags & CONSOLE_READ_OPS) ? "inputmode" : "");
+ return TCL_OK;
+ }
+
+ if (infoPtr->flags & CONSOLE_READ_OPS) {
+ return Tcl_BadChannelOption(interp, optionName, "inputmode");
+ } else {
+ return Tcl_BadChannelOption(interp, optionName, "");
}
- return TCL_OK;
}
/*