DIB_DirectDrawSurface_BltFast signed/unsigned comparision bug

Piotr Pawlow pp at siedziba.pl
Sat Jan 17 22:29:43 CST 2004


I spotted this bug while trying to fix mouse pointer trails problem in 
Warlords Battlecry. All widths, heights and left/top coordinates are of DWORD 
type, so substracting them from each other always give positive numbers. Thus 
h and w are always >= 0, so DDERR_INVALIDRECT is returned only in a couple of 
boundary cases.

I just added explicit casting to int where needed. It didn't fix the mouse 
trails, but previously missing mouseover effect on icons at the main screen 
appeared, so I guess it is a change in the right direction :)

Patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bltfast.patch
Type: text/x-diff
Size: 1117 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20040118/e47702a4/bltfast.bin

More information about the wine-devel mailing list