From db712aaf9baa33e4700d0edaf43bf96a0ef74459 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Tue, 23 Sep 2008 07:38:00 +0000 Subject: [PATCH] overrun of static array Fix for Coverity error CID: 546 + 547. svn path=/trunk/; revision=36413 --- reactos/dll/win32/user32/windows/defwnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/user32/windows/defwnd.c b/reactos/dll/win32/user32/windows/defwnd.c index 36ba8c35f1e..ec0da5e5348 100644 --- a/reactos/dll/win32/user32/windows/defwnd.c +++ b/reactos/dll/win32/user32/windows/defwnd.c @@ -61,7 +61,7 @@ InitStockObjects(void) DWORD STDCALL GetSysColor(int nIndex) { - if(nIndex >= 0 && nIndex <= NUM_SYSCOLORS) + if(nIndex >= 0 && nIndex < NUM_SYSCOLORS) { return g_psi->SysColors[nIndex]; } @@ -91,7 +91,7 @@ GetSysColorPen(int nIndex) HBRUSH STDCALL GetSysColorBrush(int nIndex) { - if(nIndex >= 0 && nIndex <= NUM_SYSCOLORS) + if(nIndex >= 0 && nIndex < NUM_SYSCOLORS) { return g_psi->SysColorBrushes[nIndex]; }