From 329a8994f7ad5454f83d576ad2b826585560424b Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 22 Jul 2009 18:39:25 +0200 Subject: Use the highest order actually used, not MAX_ORDER, for checking whether to flush (Thanks Mirko) --- src/config.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/config.c') diff --git a/src/config.c b/src/config.c index 99e3e07..8fff8d0 100644 --- a/src/config.c +++ b/src/config.c @@ -7,6 +7,8 @@ #include "i3status.h" +int highest_order = 0; + /* * Reads the configuration from the given file * @@ -111,9 +113,8 @@ int load_configuration(const char *configfile) { } OPT("order") { - #define SET_ORDER(opt, idx) { if (strcasecmp(token, opt) == 0) order[idx] = c++; } + #define SET_ORDER(opt, idx) { if (strcasecmp(token, opt) == 0) order[idx] = highest_order++; } char *walk, *token; - int c = 0; walk = token = dest_value; while (*walk != '\0') { while ((*walk != ',') && (*walk != '\0')) -- cgit v1.2.3