mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
Don't risk a negative array subscript. Fixes our one and only REVERSE_NEGATIVE error
Fix for Coverity error CID: 766 svn path=/trunk/; revision=36435
This commit is contained in:
parent
b13cfee486
commit
504c3f3278
1 changed files with 1 additions and 2 deletions
|
@ -23,7 +23,6 @@ UpdateButtonColor(HWND hwndDlg, GLOBALS* g, INT ID, INT nButton, INT nColor)
|
||||||
RECT rect;
|
RECT rect;
|
||||||
HBRUSH hbrush;
|
HBRUSH hbrush;
|
||||||
HWND hwndColorButton;
|
HWND hwndColorButton;
|
||||||
COLORREF crColor = g->ThemeAdv.crColor[nColor];
|
|
||||||
HGDIOBJ hgdiTmp;
|
HGDIOBJ hgdiTmp;
|
||||||
|
|
||||||
if (nColor != -1)
|
if (nColor != -1)
|
||||||
|
@ -42,7 +41,7 @@ UpdateButtonColor(HWND hwndDlg, GLOBALS* g, INT ID, INT nButton, INT nColor)
|
||||||
rect.top = 2;
|
rect.top = 2;
|
||||||
rect.right = 22;
|
rect.right = 22;
|
||||||
rect.bottom = 13;
|
rect.bottom = 13;
|
||||||
hbrush = CreateSolidBrush(crColor);
|
hbrush = CreateSolidBrush(g->ThemeAdv.crColor[nColor]);
|
||||||
FillRect(hdcCompat, &rect, hbrush);
|
FillRect(hdcCompat, &rect, hbrush);
|
||||||
DeleteObject(hbrush);
|
DeleteObject(hbrush);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue