From 101ac8bca755a22b853816ef11db876e71d0ee29 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 8 Mar 2018 02:28:49 +0000 Subject: Reduce the "clever" factor. (Fine line between clever and stupid.) --- generic/tclExecute.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 2e3fcb9..a6042bb 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -5076,8 +5076,8 @@ TEBCresume( */ valuePtr = OBJ_AT_TOS; - opnd = TclGetInt4AtPtr(pc+1); - TRACE(("\"%.30s\" %d => ", O2S(valuePtr), opnd)); + index = TclGetInt4AtPtr(pc+1); + TRACE(("\"%.30s\" %d => ", O2S(valuePtr), index)); /* * Get the contents of the list, making sure that it really is a list @@ -5093,7 +5093,9 @@ TEBCresume( * Decode end-offset index values. */ - index = opnd + (opnd <= TCL_INDEX_END)*(objc - 1 - TCL_INDEX_END); + if (index <= TCL_INDEX_END) { + index += (objc - 1 - TCL_INDEX_END); + } pcAdjustment = 5; lindexFastPath: -- cgit v0.12