diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2009-09-01 23:43:31 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2009-09-01 23:43:31 +0200 |
commit | 112512c546c8d9a46b503b5e4b9cc10afb1a248e (patch) | |
tree | 6f848e8b91a2b89e9525e376dffb598c69faef6b | |
parent | 1c0e5ea560869092a7779c9d5984ded6848794ce (diff) |
Initialize order array with -1 to avoid printing duplicate lines (Thanks XTaran)
-rw-r--r-- | src/config.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |