diff --git a/reactos/dll/win32/gdi32/objects/palette.c b/reactos/dll/win32/gdi32/objects/palette.c index c10b1dd1ed9..52ebc229619 100644 --- a/reactos/dll/win32/gdi32/objects/palette.c +++ b/reactos/dll/win32/gdi32/objects/palette.c @@ -63,6 +63,9 @@ GetDIBColorTable(HDC hDC, return NtGdiDoPalette(hDC, iStartIndex, cEntries, pColors, GdiPalGetColorTable, FALSE); } +/* + * @implemented + */ UINT WINAPI SetDIBColorTable(HDC hDC, @@ -70,7 +73,14 @@ SetDIBColorTable(HDC hDC, 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 */