Tcl Source Code

Artifact [390b2e89e4]
Login

Artifact 390b2e89e49d51bc842ef177685b6deccaa7cc5767116622aeeccb652649e153:

Attachment "tclCmdIL.patch" to ticket [5a1aaa201d] added by juliannoble2 2024-11-18 03:12:37.
--- tclCmdIL_orig.c	Sat Oct 05 06:09:52 2024
+++ tclCmdIL.c	Mon Nov 18 13:59:01 2024
@@ -3926,6 +3926,10 @@
 		    itemPtr = SelectObjFromSublist(listv[i+groupOffset],
 			    &sortInfo);
 		    Tcl_ListObjAppendElement(interp, listPtr, itemPtr);
+		} else if (returnSubindices && (sortInfo.indexc == 0) && (groupSize > 1)) {
+		    Tcl_BounceRefCount(itemPtr); 
+		    itemPtr = listv[i + groupOffset];
+			Tcl_ListObjAppendElement(interp, listPtr, itemPtr);
 		} else if (groupSize > 1) {
 		    Tcl_ListObjReplace(interp, listPtr, LIST_MAX, 0,
 			    groupSize, &listv[i]);