[PATCH v2 0/2] MR4746: ComDlg32 / Color picker does not use "limited" value, leading to out of bound
ComDlg32 / Color picker does not use "limited" value, leading to out of bound This cause the lum bar to get crazy   -- v2: Update ipaddress.c https://gitlab.winehq.org/wine/wine/-/merge_requests/4746
From: KRosUser <kyle.kcsoftwares(a)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; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4746
From: KRosUser <kyle.kcsoftwares(a)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); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4746
participants (2)
-
KRosUser -
Kyle Katarn (@KRosUser)