summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-09-02 20:22:15 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-09-02 20:22:15 (GMT)
commit712f88bef73db43ea3e8169d8c5609ec420b3bf2 (patch)
treefa06dc169be56e3e15b3333290345f8532cb0065 /generic/tclExecute.c
parentee7073e46860e7e4746d0f8d68a8b66e708eb763 (diff)
downloadtcl-712f88bef73db43ea3e8169d8c5609ec420b3bf2.zip
tcl-712f88bef73db43ea3e8169d8c5609ec420b3bf2.tar.gz
tcl-712f88bef73db43ea3e8169d8c5609ec420b3bf2.tar.bz2
Fix for test lindex-18.0
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 70ed54a..890ce08 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -4857,13 +4857,19 @@ TEBCresume(
*/
if ((TclListObjGetElements(interp, valuePtr, &objc, &objv) == TCL_OK)
- && !TclHasIntRep(value2Ptr, &tclListType)
- && (TclGetIntForIndexM(NULL, value2Ptr, objc-1,
- &index) == TCL_OK)) {
- TclDecrRefCount(value2Ptr);
- tosPtr--;
- pcAdjustment = 1;
- goto lindexFastPath;
+ && !TclHasIntRep(value2Ptr, &tclListType)) {
+ int code;
+
+ DECACHE_STACK_INFO();
+ code = TclGetIntForIndexM(interp, value2Ptr, objc-1, &index);
+ CACHE_STACK_INFO();
+ if (code == TCL_OK) {
+ TclDecrRefCount(value2Ptr);
+ tosPtr--;
+ pcAdjustment = 1;
+ goto lindexFastPath;
+ }
+ Tcl_ResetResult(interp);
}
objResultPtr = TclLindexList(interp, valuePtr, value2Ptr);