projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
In the config dialog, clip RGB values to [0..255] rather than reducing them
[u/mdw/putty]
/
config.c
diff --git
a/config.c
b/config.c
index
c844e05
..
a2f660f
100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-564,7
+564,9
@@
static void colour_handler(union control *ctrl, void *dlg,
int i, cval;
dlg_editbox_get(ctrl, dlg, buf, lenof(buf));
- cval = atoi(buf) & 255;
+ cval = atoi(buf);
+ if (cval > 255) cval = 255;
+ if (cval < 0) cval = 0;
i = dlg_listbox_index(cd->listbox, dlg);
if (i >= 0) {