Author: greatlrd
Date: Sun Sep 2 18:11:28 2007
New Revision: 28775
URL:
http://svn.reactos.org/svn/reactos?rev=28775&view=rev
Log:
add smaller check to SetDIBColorTable
Modified:
trunk/reactos/dll/win32/gdi32/objects/palette.c
Modified: trunk/reactos/dll/win32/gdi32/objects/palette.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/pa…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/palette.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/palette.c Sun Sep 2 18:11:28 2007
@@ -63,6 +63,9 @@
return NtGdiDoPalette(hDC, iStartIndex, cEntries, pColors, GdiPalGetColorTable,
FALSE);
}
+/*
+ * @implemented
+ */
UINT
WINAPI
SetDIBColorTable(HDC hDC,
@@ -70,7 +73,14 @@
UINT cEntries,
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 */