Fallout from the big revamp in r9214: colour handling was going a bit
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 8 Apr 2012 09:42:58 +0000 (09:42 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 8 Apr 2012 09:42:58 +0000 (09:42 +0000)
wonky because I'd used the subkey for the red component in four places
where I should have used the green/blue subkeys instead. Thanks to
Martin Kletzander for spotting it.

git-svn-id: svn://svn.tartarus.org/sgt/putty@9449 cda61777-01e9-0310-a592-d414129be87e

config.c

index 87cff8c..c50d97d 100644 (file)
--- a/config.c
+++ b/config.c
@@ -847,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;
        }
@@ -901,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;
            }