[GDI32] Fix GetObjectW() GDI_OBJECT_TYPE_BRUSH handling. (#4394)
authorVictor Martinez Calvo <vicmarcal@gmail.com>
Tue, 3 May 2022 14:00:21 +0000 (16:00 +0200)
committerGitHub <noreply@github.com>
Tue, 3 May 2022 14:00:21 +0000 (16:00 +0200)
commitb57be0a746fd9b42fed0e9ac5cf88eaf222ce11d
treed525f0a8a38c35045ace45647afee47bbf90827a
parent3e2df36561ee2360dcbb08f59aa9837ec479351f
[GDI32] Fix GetObjectW() GDI_OBJECT_TYPE_BRUSH handling. (#4394)

This fixes the last GetObjectW apitest case:
ok_long(GetObjectA(hBrush, 0, &TestStruct), 0);

- When "cbSize" is "0", GetObjectW shouldn't return "sizeof(LOGBRUSH)" but 0.
- Rely in BRUSH::cjGetObject behavior which returns 0 when cjSize is 0.

Co-authored-by: Víctor Martínez Calvo <victormartinez@alub.io>
win32ss/gdi/gdi32/objects/gdiobj.c