mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 17:01:53 +00:00
overrun of static array
Fix for Coverity error CID: 546 + 547. svn path=/trunk/; revision=36413
This commit is contained in:
parent
eb68ba4328
commit
db712aaf9b
1 changed files with 2 additions and 2 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue