From 7e0ace1f1e5334f13580facb53c253c94c6913f6 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Tue, 21 Mar 2023 22:44:57 +0100 Subject: add dmenu-wl_run and dmenu_path and config.mk --- dmenu-wl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'dmenu-wl.c') diff --git a/dmenu-wl.c b/dmenu-wl.c index 9debd69..252182c 100644 --- a/dmenu-wl.c +++ b/dmenu-wl.c @@ -425,8 +425,7 @@ readstdin() char *buf = malloc(MAX_LINE_LENGTH); Option *option; - while (fgets(buf, MAX_LINE_LENGTH, stdin) != 0) { - ++numitems; + for (;fgets(buf, MAX_LINE_LENGTH, stdin) != 0; ++numitems) { option = malloc(sizeof(Option)); option->name = buf; s = strlen(option->name); -- cgit v1.2.3-70-g09d2