From 52549ae747613994a8ced4de9b567bc4cc09443f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 12 Aug 2020 10:25:49 +0000 Subject: Fix [e87000d8425ab86a]: crash for "fconfigure stdout" in Win32. Even though the crash cannot happen in Tcl 8.6, the function Tcl_BadChannelOption() was to blame, so better fix that in 8.6 too. --- generic/tclIO.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index 7abeb68..82eb581 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -7699,7 +7699,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]); -- cgit v0.12