Commit ce94c78b authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Fix SetPixel error return value.

parent f5bd0be6
......@@ -453,7 +453,7 @@ COLORREF WINAPI SetPixel( HDC hdc, INT x, INT y, COLORREF color )
COLORREF ret;
DC * dc = get_dc_ptr( hdc );
if (!dc) return 0;
if (!dc) return ~0;
update_dc( dc );
physdev = GET_DC_PHYSDEV( dc, pSetPixel );
ret = physdev->funcs->pSetPixel( physdev, x, y, color );
......
......@@ -1672,6 +1672,15 @@ static void test_clip_box(void)
DeleteObject(bitmap);
}
static void test_SetPixel(void)
{
COLORREF c;
c = SetPixel((HDC)0xdeadbeef, 0, 0, 0);
ok(c == ~0, "SetPixel returned: %x\n", c);
}
START_TEST(dc)
{
test_dc_values();
......@@ -1688,4 +1697,5 @@ START_TEST(dc)
test_printer_dc();
test_pscript_printer_dc();
test_clip_box();
test_SetPixel();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment