https://bugs.winehq.org/show_bug.cgi?id=56102
Bug ID: 56102 Summary: Comdlg32/Color - Out of bound value is used Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: comdlg32 Assignee: wine-bugs@winehq.org Reporter: kyle.kcsoftwares@gmail.com Distribution: ---
- Set HSV to max value by typing 999 - Automatically sets to 239, 240, 240 Scenario 1 : - Click on the 2D spectrum - Lum gets to 999 => should stay to 240 Scenario 2 : - Click on right ribbon - H & S gets to 999 and ribbon gets crazy
Faulty code is CC_CheckDigitsInEdit where the raw value is returned even when exceeding max value
if (value > maxval) /* build a new string */ { sprintf(buffer, "%d", maxval); result = 2; }
should be replaced by
if (value > maxval) /* build a new string */ { value = maxval; sprintf(buffer, "%d", maxval); result = 2; }