3 Mar
2026
3 Mar
'26
10:23 a.m.
Please add a test first and mark the test failing on Wine with a todo_wine, and then fix it in the second patch. Also, I wonder if you can test cMaxImage by calling ImageList_Replace(). For example, if cMaxImage ends up being 1 after you try to create an imagelist with an excessively large image count, then ImageList_Replace(imagelist, 0, ...) should succeed, and ImageList_Replace(imagelist, 1, ...) should fail, at least according to Wine's implementation. If that doesn't work, I would recommend using Wine's `struct _IMAGELIST` layout and reading cMaxImage. The struct layout should be compatible with Windows for the first few members. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10059#note_131087