Fix return value from GetObject gdi32_apitest (#7046)

This commit is contained in:
Jose Carlos Jesus 2024-07-06 16:55:06 -04:00 committed by GitHub
parent cdb438552c
commit c3a45b679d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -265,10 +265,11 @@ GetObjectW(
(dwType == GDI_OBJECT_TYPE_BRUSH) ||
(dwType == GDI_OBJECT_TYPE_COLORSPACE) ||
( (dwType == GDI_OBJECT_TYPE_EXTPEN) &&
( (cbSize >= sizeof(EXTLOGPEN)) || (cbSize == 0) ) ) ||
( (cbSize >= sizeof(EXTLOGPEN)))) ||
( (dwType == GDI_OBJECT_TYPE_BITMAP) && (cbSize >= sizeof(BITMAP)) ))
{
SetLastError(ERROR_NOACCESS);
if (cbSize)
SetLastError(ERROR_NOACCESS);
}
}
}