diff options
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r-- | generic/tclCompCmds.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 22faa16..dc2470c 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -2762,10 +2762,12 @@ CompileEachloopCmd( Tcl_Obj *varNameObj; const char *bytes; int varIndex; + size_t length; + Tcl_ListObjIndex(NULL, varListObj, j, &varNameObj); - bytes = TclGetString(varNameObj); - varIndex = LocalScalar(bytes, varNameObj->length, envPtr); + bytes = TclGetStringFromObj(varNameObj, &length); + varIndex = LocalScalar(bytes, length, envPtr); if (varIndex < 0) { code = TCL_ERROR; goto done; |