From: Simon Tatham Date: Sun, 8 Apr 2012 09:42:58 +0000 (+0000) Subject: Fallout from the big revamp in r9214: colour handling was going a bit X-Git-Tag: 0.63~215 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=63cb9c835663881e2c473753b7e54d2ceb2b7d47;hp=947fa8f0aee7b9f54eee499d81f6d27af721ab1a;p=PuTTY.git Fallout from the big revamp in r9214: colour handling was going a bit 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. [originally from svn r9449] [r9214 == a1f3b7a358adaa7c2a98359cd0373aa823eeb14b] --- diff --git a/config.c b/config.c index 87cff8cd..c50d97da 100644 --- 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; }