From: simon Date: Fri, 15 Jul 2011 18:18:28 +0000 (+0000) Subject: conf_copy_into must empty the entire target conf before filling it X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/cfce7239bb87f74d38c81f83ebd8e852144b5baa 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. git-svn-id: svn://svn.tartarus.org/sgt/putty@9218 cda61777-01e9-0310-a592-d414129be87e --- 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);