Index: generic/xotcl.c =================================================================== diff -u -rb187bc23ce51a3c8a3f99010d1088dd3d3330fff -r7f903442026608a0b4e3ac62777ac87c468214fb --- generic/xotcl.c (.../xotcl.c) (revision b187bc23ce51a3c8a3f99010d1088dd3d3330fff) +++ generic/xotcl.c (.../xotcl.c) (revision 7f903442026608a0b4e3ac62777ac87c468214fb) @@ -6243,13 +6243,14 @@ ClientData *clientData, Tcl_Obj **outObjPtr) { int result, bool; result = Tcl_GetBooleanFromObj(interp, objPtr, &bool); + if (result == TCL_OK) { *clientData = (ClientData)INT2PTR(bool); - *outObjPtr = objPtr; } else { XOTclVarErrMsg(interp, "expected boolean value but got \"", ObjStr(objPtr), "\" for parameter ", pPtr->name, NULL); } + *outObjPtr = objPtr; return result; } @@ -12497,10 +12498,11 @@ result = ArgumentCheck(interp, value, paramPtr, &flags, &checkedData, &outObjPtr); - if (value != outObjPtr) { - /*fprintf(stderr, "reset result %p %p\n", value, outObjPtr);*/ + if (paramPtr->converter == convertViaCmd && + (withNocomplain || result == TCL_OK)) { + /* fprintf(stderr, "reset result %p %p\n", value, outObjPtr);*/ Tcl_ResetResult(interp); - } + } if (flags & XOTCL_PC_MUST_DECR) { DECR_REF_COUNT(outObjPtr);