From fdf1c5572d4e0ae7fe973e0afaa4cefb7717cdf5 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Fri, 8 May 2020 14:53:44 -0700 Subject: [PATCH] 65536 widgets is totally atainable in some crazy dmenu setups --- src/wofi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wofi.c b/src/wofi.c index d44e37c..131bdbf 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -88,7 +88,7 @@ static enum location location; static bool no_actions; static uint64_t columns; static bool user_moved = false; -static uint16_t widget_count = 0; +static uint32_t widget_count = 0; static enum sort_order sort_order; static int64_t max_height = 0; static uint64_t lines; @@ -359,7 +359,7 @@ static GtkWidget* create_label(char* mode, char* text, char* search_text, char* gtk_style_context_add_class(style, "entry"); wofi_property_box_add_property(WOFI_PROPERTY_BOX(box), "mode", mode); wofi_property_box_add_property(WOFI_PROPERTY_BOX(box), "action", action); - char index[6]; + char index[11]; snprintf(index, sizeof(index), "%u", ++widget_count); wofi_property_box_add_property(WOFI_PROPERTY_BOX(box), "index", index);