]> git.sur5r.net Git - i3/i3status/commitdiff
Initialize order array with -1 to avoid printing duplicate lines (Thanks XTaran)
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 1 Sep 2009 21:43:31 +0000 (23:43 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 1 Sep 2009 21:43:31 +0000 (23:43 +0200)
src/config.c

index 19c03e996c568ca3014d8f86782b71cb01da9942..e39c19b66d3c5bfca96e7b71eb273a03e2133737 100644 (file)
@@ -112,6 +112,10 @@ int load_configuration(const char *configfile) {
                 }
                 OPT("order")
                 {
+
+                        for (int c = 0; c < MAX_ORDER; c++)
+                                order[c] = -1;
+
                         #define SET_ORDER(opt, idx) { if (strcasecmp(token, opt) == 0) order[idx] = highest_order++; }
                         char *walk, *token;
                         walk = token = dest_value;