Skip to content
Snippets Groups Projects
Commit 1aeaff47 authored by Simon Tatham's avatar Simon Tatham
Browse files

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]
parent 086764f5
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment