diff options
| -rw-r--r-- | generic/tclIO.c | 2 | ||||
| -rw-r--r-- | generic/tclInt.h | 2 | ||||
| -rw-r--r-- | win/tclWinConsole.c | 11 |
3 files changed, 9 insertions, 6 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 7303314..884bd83 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -7667,7 +7667,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 817e150..47b1d8e 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -1718,7 +1718,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 3f72ab2..7e20ee9 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; } /* |
