aboutsummaryrefslogtreecommitdiff
path: root/dragon.c
diff options
context:
space:
mode:
Diffstat (limited to 'dragon.c')
-rw-r--r--dragon.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/dragon.c b/dragon.c
index 112a08d..fca077c 100644
--- a/dragon.c
+++ b/dragon.c
@@ -131,8 +131,13 @@ GtkButton *add_button(char *label, struct draggable_thing *dragdata, int type) {
gtk_container_add(GTK_CONTAINER(vbox), button);
- if(drag_all)
- uri_collection[uri_count++] = dragdata->uri;
+ if (drag_all) {
+ if (uri_count < MAX_SIZE) {
+ uri_collection[uri_count++] = dragdata->uri;
+ } else {
+ fprintf(stderr, "Exceeded maximum number of files for drag_all (%d)\n", MAX_SIZE);
+ }
+ }
return (GtkButton *)button;
}
bgstack15