add smaller check to SetDIBColorTable

svn path=/trunk/; revision=28775
This commit is contained in:
Magnus Olsen 2007-09-02 14:11:28 +00:00
parent 8e85947cea
commit 0d6c6a0913

View file

@ -63,6 +63,9 @@ GetDIBColorTable(HDC hDC,
return NtGdiDoPalette(hDC, iStartIndex, cEntries, pColors, GdiPalGetColorTable, FALSE); return NtGdiDoPalette(hDC, iStartIndex, cEntries, pColors, GdiPalGetColorTable, FALSE);
} }
/*
* @implemented
*/
UINT UINT
WINAPI WINAPI
SetDIBColorTable(HDC hDC, SetDIBColorTable(HDC hDC,
@ -70,7 +73,14 @@ SetDIBColorTable(HDC hDC,
UINT cEntries, UINT cEntries,
const RGBQUAD *pColors) const RGBQUAD *pColors)
{ {
return NtGdiDoPalette(hDC, iStartIndex, cEntries, (RGBQUAD*)pColors, GdiPalSetColorTable, TRUE); UINT retValue=0;
if (cEntries)
{
retValue = NtGdiDoPalette(hDC, iStartIndex, cEntries, (RGBQUAD*)pColors, GdiPalSetColorTable, TRUE);
}
return retValue;
} }
/* EOF */ /* EOF */