Mended Color Mixer random color bug
If you set a color, then come back to Color Mixer and immediately dismiss the dialog (without setting a color), an indeterminate color could appear due to uninitialized variables (new_r, _g, _b). Closes https://sourceforge.net/p/tuxpaint/bugs/251/ h/t @kentonyanamin on Twitter
This commit is contained in:
parent
7e6f848994
commit
1068a33167
2 changed files with 15 additions and 0 deletions
|
|
@ -23209,6 +23209,14 @@ static int do_color_mix(void)
|
|||
for (i = 0; i < NUM_MIXER_COLORS; i++)
|
||||
color_mixer_color_counts[i] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_r = color_hexes[COLOR_MIXER][0];
|
||||
new_g = color_hexes[COLOR_MIXER][1];
|
||||
new_b = color_hexes[COLOR_MIXER][2];
|
||||
}
|
||||
|
||||
|
||||
|
||||
done = 0;
|
||||
chose = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue