summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index fab8590..8e6f4b5 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -9121,6 +9121,13 @@ IllegalExprOperandType(
}
if (GetNumberFromObj(NULL, opndPtr, &ptr, &type) != TCL_OK) {
+ Tcl_ObjTypeLengthProc *lengthProc = TclObjTypeHasProc(opndPtr, lengthProc);
+ if (lengthProc && lengthProc(opndPtr) > 1) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "can't use a list as operand of \"%s\"", op));
+ Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", "list", (char *)NULL);
+ return;
+ }
description = "non-numeric string";
} else if (type == TCL_NUMBER_NAN) {
description = "non-numeric floating-point value";