diff options
| -rw-r--r-- | win/tclWinConsole.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index 3b8753b..8b1b2da 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -1527,14 +1527,11 @@ ConsoleSetOptionProc( } else { infoPtr->flags |= CONSOLE_RESET; } - return TCL_OK; - } - - if (infoPtr->flags & CONSOLE_READ_OPS) { - return Tcl_BadChannelOption(interp, optionName, "inputmode"); - } else { - return Tcl_BadChannelOption(interp, optionName, ""); + } else if (len > 0) { + return Tcl_BadChannelOption(interp, optionName, + (infoPtr->flags & CONSOLE_READ_OPS) ? "inputmode" : ""); } + return TCL_OK; } /* |
