From 126cd8d362a32eb599af5ff0d6059647793a1423 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 15 Apr 2009 15:02:02 -0700 Subject: [PATCH] cfg: Keep configuration sorted when adding entries. Otherwise later cfg accesses are likely to assert-fail since the configuration is no longer sorted. --- lib/cfg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/cfg.c b/lib/cfg.c index d588e642..63bfe0d8 100644 --- a/lib/cfg.c +++ b/lib/cfg.c @@ -500,6 +500,7 @@ cfg_add_entry(const char *entry_, ...) FORMAT_KEY(entry_, entry); svec_add_nocopy(&cfg, entry); + svec_sort(&cfg); svec_terminate(&cfg); dirty = true; } -- 2.30.2