diff options
Diffstat (limited to 'generic/tclVar.c')
| -rw-r--r-- | generic/tclVar.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index 6226e1e..f7ec7c8 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -4042,8 +4042,7 @@ ArraySetCmd( size_t elemLen; Tcl_Obj **elemPtrs, *copyListObj; - result = TclListObjGetElementsM(interp, arrayElemObj, - &elemLen, &elemPtrs); + result = TclListObjLengthM(interp, arrayElemObj, &elemLen); if (result != TCL_OK) { return result; } @@ -4056,6 +4055,11 @@ ArraySetCmd( if (elemLen == 0) { goto ensureArray; } + result = TclListObjGetElementsM(interp, arrayElemObj, + &elemLen, &elemPtrs); + if (result != TCL_OK) { + return result; + } /* * We needn't worry about traces invalidating arrayPtr: should that be |
