From 1aeaff47a9d93720df01a3657bbfe17cbb7b4995 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 15 Jul 2011 18:18:28 +0000 Subject: [PATCH] conf_copy_into must empty the entire target conf before filling it with the entries from the source one, otherwise add234 will keep failing ("this key already exists"). Completely broke Plink, ahem. [originally from svn r9218] --- conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf.c b/conf.c index 89bf5c3b..32684499 100644 --- a/conf.c +++ b/conf.c @@ -199,6 +199,8 @@ void conf_copy_into(Conf *newconf, Conf *oldconf) struct conf_entry *entry, *entry2; int i; + conf_clear(newconf); + for (i = 0; (entry = index234(oldconf->tree, i)) != NULL; i++) { entry2 = snew(struct conf_entry); copy_key(&entry2->key, &entry->key);