X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/4a693cfc5c3ee0e639bbee0215345e921715ab04..8221906dee8ae94c7c81d320d00ef774765d0bc6:/settings.c?ds=sidebyside diff --git a/settings.c b/settings.c index de69d660..934f186f 100644 --- a/settings.c +++ b/settings.c @@ -145,10 +145,8 @@ static int gppmap(void *handle, char *name, Conf *conf, int primary) /* * Start by clearing any existing subkeys of this key from conf. */ - for (val = conf_get_str_strs(conf, primary, NULL, &key); - val != NULL; - val = conf_get_str_strs(conf, primary, key, &key)) - conf_del_str_str(conf, primary, key); + while ((key = conf_get_str_nthstrkey(conf, primary, 0)) != NULL) + conf_del_str_str(conf, primary, key); /* * Now read a serialised list from the settings and unmarshal it