aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generic/tkZinc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/tkZinc.c b/generic/tkZinc.c
index 5a1a26c..f7d6622 100644
--- a/generic/tkZinc.c
+++ b/generic/tkZinc.c
@@ -1783,18 +1783,23 @@ WidgetCmd(ClientData client_data, /* Information about Radar widget. */
* clone
*/
else if ((c == 'c') && (strncmp(LangString(args[1]), "clone", length) == 0)) {
- if (argc != 3) {
+ if (argc < 3) {
Tcl_AppendResult(interp, "wrong # args: should be \"", LangString(args[0]),
- "\" clone tagOrIg", NULL);
+ "\" clone tagOrId ?args?", NULL);
goto error;
}
num = RadarItemsWithTagOrId(wi, LangString(args[2]), &item, &items);
if (num == 0) {
goto error;
}
+ argc -= 3;
+ args += 3;
for (i = 0; i < num; i++) {
item = ITEM.CloneItem(items[i]);
ITEM.InsertItem(item, items[i]->parent, RADAR_NO_ITEM, True);
+ if (ITEM.ConfigureItem(item, -1, argc, args, False) == RADAR_ERROR) {
+ goto error;
+ }
sprintf(msg, "%d", item->id);
Tcl_AppendElement(interp, msg);
}