Add missing check for failure to agree a host key algorithm.
[u/mdw/putty] / config.c
index a7236d1..c50d97d 100644 (file)
--- a/config.c
+++ b/config.c
@@ -131,12 +131,11 @@ void conf_filesel_handler(union control *ctrl, void *dlg,
     Conf *conf = (Conf *)data;
 
     if (event == EVENT_REFRESH) {
-       dlg_filesel_set(ctrl, dlg, *conf_get_filename(conf, key));
+       dlg_filesel_set(ctrl, dlg, conf_get_filename(conf, key));
     } else if (event == EVENT_VALCHANGE) {
-       Filename filename;
-       dlg_filesel_get(ctrl, dlg, &filename);
-       conf_set_filename(conf, key, &filename);
-       /* If Filenames ever become dynamic, free this one. */
+       Filename *filename = dlg_filesel_get(ctrl, dlg);
+       conf_set_filename(conf, key, filename);
+        filename_free(filename);
     }
 }
 
@@ -848,8 +847,8 @@ static void colour_handler(union control *ctrl, void *dlg,
            } else {
                clear = FALSE;
                r = conf_get_int_int(conf, CONF_colours, i*3+0);
-               g = conf_get_int_int(conf, CONF_colours, i*3+0);
-               b = conf_get_int_int(conf, CONF_colours, i*3+0);
+               g = conf_get_int_int(conf, CONF_colours, i*3+1);
+               b = conf_get_int_int(conf, CONF_colours, i*3+2);
            }
            update = TRUE;
        }
@@ -902,8 +901,8 @@ static void colour_handler(union control *ctrl, void *dlg,
             */
            if (dlg_coloursel_results(ctrl, dlg, &r, &g, &b)) {
                conf_set_int_int(conf, CONF_colours, i*3+0, r);
-               conf_set_int_int(conf, CONF_colours, i*3+0, g);
-               conf_set_int_int(conf, CONF_colours, i*3+0, b);
+               conf_set_int_int(conf, CONF_colours, i*3+1, g);
+               conf_set_int_int(conf, CONF_colours, i*3+2, b);
                clear = FALSE;
                update = TRUE;
            }