summaryrefslogtreecommitdiffstats
path: root/generic/tclDictObj.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclDictObj.c')
-rw-r--r--generic/tclDictObj.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index dac4cbe..b64b776 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -2619,6 +2619,7 @@ DictMapNRCmd(
* internally so that updates, shimmering, etc are not a problem.
*/
+ Tcl_IncrRefCount(storagePtr->accumulatorObj);
Tcl_IncrRefCount(storagePtr->keyVarObj);
Tcl_IncrRefCount(storagePtr->valueVarObj);
Tcl_IncrRefCount(storagePtr->scriptObj);
@@ -2707,7 +2708,7 @@ DictMapLoopCallback(
Tcl_DictObjNext(&storagePtr->search, &keyObj, &valueObj, &done);
if (done) {
- Tcl_ResetResult(interp);
+ Tcl_SetObjResult(interp, storagePtr->accumulatorObj);
goto done;
}