ComDlg32 / Color picker does not use "limited" value, leading to out of bound
This cause the lum bar to get crazy
![image](/uploads/ed7511b46d1aa89e2828ddcb10f8816c/image.png) ![image](/uploads/c4d8b78416bf24929aca9a308baebd94/image.png)
-- v2: Update ipaddress.c
From: KRosUser kyle.kcsoftwares@gmail.com
--- dlls/comdlg32/colordlg.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/comdlg32/colordlg.c b/dlls/comdlg32/colordlg.c index e16014c8d19..1048e73a33f 100644 --- a/dlls/comdlg32/colordlg.c +++ b/dlls/comdlg32/colordlg.c @@ -417,6 +417,7 @@ static int CC_CheckDigitsInEdit( HWND hwnd, int maxval ) value = atoi(buffer); if (value > maxval) /* build a new string */ { + value = maxval; sprintf(buffer, "%d", maxval); result = 2; }
From: KRosUser kyle.kcsoftwares@gmail.com
--- dlls/comctl32/ipaddress.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index 493ea77f618..35bafe7d360 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -171,7 +171,9 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc) fgCol = comctl32_color.clrGrayText; }
- FillRect (hdc, &rect, (HBRUSH)(DWORD_PTR)(bgCol+1)); + HBRUSH brush = CreateSolidBrush(bgCol); + FillRect(hdc, &rect, brush); + DeleteObject(brush); DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST); }