17 Jan
2004
17 Jan
'04
10:29 p.m.
Hello, 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.