From 112512c546c8d9a46b503b5e4b9cc10afb1a248e Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 1 Sep 2009 23:43:31 +0200 Subject: [PATCH] Initialize order array with -1 to avoid printing duplicate lines (Thanks XTaran) --- src/config.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config.c b/src/config.c index 19c03e9..e39c19b 100644 --- a/src/config.c +++ b/src/config.c @@ -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; -- 2.39.5