summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r--generic/tclCmdAH.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 875bbdd..3651451 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -2875,7 +2875,8 @@ ForeachAssignments(
k = statePtr->index[i]++;
if (k < statePtr->argcList[i]) {
if (isarithseries) {
- if (TclArithSeriesObjIndex(statePtr->aCopyList[i], k, &valuePtr) != TCL_OK) {
+ valuePtr = TclArithSeriesObjIndex(interp, statePtr->aCopyList[i], k);
+ if (valuePtr == NULL) {
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (setting %s loop variable \"%s\")",
(statePtr->resultList != NULL ? "lmap" : "foreach"),