projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b13cfee
)
Don't risk a negative array subscript. Fixes our one and only REVERSE_NEGATIVE error
author
Ged Murphy
<gedmurphy@reactos.org>
Tue, 23 Sep 2008 19:02:32 +0000
(19:02 +0000)
committer
Ged Murphy
<gedmurphy@reactos.org>
Tue, 23 Sep 2008 19:02:32 +0000
(19:02 +0000)
Fix for Coverity error CID: 766
svn path=/trunk/; revision=36435
reactos/dll/cpl/desk/advappdlg.c
patch
|
blob
|
history
diff --git
a/reactos/dll/cpl/desk/advappdlg.c
b/reactos/dll/cpl/desk/advappdlg.c
index
34ba5bf
..
6212a4b
100644
(file)
--- a/
reactos/dll/cpl/desk/advappdlg.c
+++ b/
reactos/dll/cpl/desk/advappdlg.c
@@
-23,7
+23,6
@@
UpdateButtonColor(HWND hwndDlg, GLOBALS* g, INT ID, INT nButton, INT nColor)
RECT rect;
\r
HBRUSH hbrush;
\r
HWND hwndColorButton;
\r
- COLORREF crColor = g->ThemeAdv.crColor[nColor];
\r
HGDIOBJ hgdiTmp;
\r
\r
if (nColor != -1)
\r
@@
-42,7
+41,7
@@
UpdateButtonColor(HWND hwndDlg, GLOBALS* g, INT ID, INT nButton, INT nColor)
rect.top = 2;
\r
rect.right = 22;
\r
rect.bottom = 13;
\r
- hbrush = CreateSolidBrush(
crColor
);
\r
+ hbrush = CreateSolidBrush(
g->ThemeAdv.crColor[nColor]
);
\r
FillRect(hdcCompat, &rect, hbrush);
\r
DeleteObject(hbrush);
\r
\r