diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-06-21 21:30:53 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-06-21 21:30:53 (GMT) |
| commit | bc87d9a2bc25805bbeda05983b9a403d0767fb1f (patch) | |
| tree | d66a89aab2277d0b66eeef2bbb1639df7fd44cbe | |
| parent | 7c2d72933f0d49aeac8e89082e833c41bda2b9f9 (diff) | |
| download | tcl-bc87d9a2bc25805bbeda05983b9a403d0767fb1f.zip tcl-bc87d9a2bc25805bbeda05983b9a403d0767fb1f.tar.gz tcl-bc87d9a2bc25805bbeda05983b9a403d0767fb1f.tar.bz2 | |
Fix 3 "lset" testcases
| -rw-r--r-- | generic/tclListObj.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c index d3e4f02..0fd489c 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -2871,6 +2871,9 @@ TclLsetFlat( } indexArray++; + if ((index == INT_MAX) && (elemCount == 0)) { + index = 0; + } if (index < 0 || index > elemCount || (valueObj == NULL && index >= elemCount)) { /* ...the index points outside the sublist. */ |
