snowcone-ltd / libmatoya

Cross-platform application development.
MIT License
578 stars 50 forks source link

bitmask passed to CreateBitmap was too small #109

Closed bmcnett closed 7 months ago

bmcnett commented 1 year ago

size was calculated by "width + padding height", should be "(width + padding) height." this doesn't seem to have ever resulted in an error, though it would produce a bitmask that is far too small, in cases where width is large and padding is small.

new expression to calculate bitmask size in bytes, copied from https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createbitmap

chrisd1100 commented 11 months ago

The current implementation has been robust for years given a wide variety of cursor inputs from the wild, can you confirm the same for your implementation?