gdi32/tests: Fix the GetObject last error check for most Windows versions.
authorAlexandre Julliard <julliard@winehq.org>
Mon, 23 Aug 2010 09:11:16 +0000 (11:11 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 23 Aug 2010 09:11:16 +0000 (11:11 +0200)
dlls/gdi32/tests/gdiobj.c

index 7302134fa4a97fa5218a7fabb288fe475a1fba6c..636707161fb404c59857627c1fba0dff9122d074 100644 (file)
@@ -85,7 +85,7 @@ static void test_gdi_objects(void)
     hp = SelectObject(hdc, GetStockObject(BLACK_PEN));
     SetLastError(0);
     i = GetObjectA(hp, (INT_PTR)buff, (LPVOID)sizeof(buff));
-    ok (!i && GetLastError() == ERROR_NOACCESS,
+    ok (!i && (GetLastError() == 0 || GetLastError() == ERROR_NOACCESS),
         "GetObject(invalid buff), expected 0, ERROR_NOACCESS, got %d, %u\n",
     i, GetLastError());