summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2009-07-22 18:39:25 +0200
committerMichael Stapelberg <michael@stapelberg.de>2009-07-22 18:39:41 +0200
commit329a8994f7ad5454f83d576ad2b826585560424b (patch)
tree2145413dc3882c8c1e2431a6658a0994438a886c /src
parentc9ab465cbba2dc38c5564582531e1b44c8d63ce8 (diff)
Use the highest order actually used, not MAX_ORDER, for checking whether to flush (Thanks Mirko)
Diffstat (limited to 'src')
-rw-r--r--src/config.c5
1 files changed, 3 insertions, 2 deletions
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'))