As I reported, I put in some trace's in the innermost x & y loops. The problem is that the entire theImage is filled with zeros. Both xmax and ymax are 32 and I can't belive the compiler is so broken that the ++ operator fails; if so, we have more problems here, ground control.
So only your last possibility seems reasonable. On the other hand, why can't a cursor mask be all zero's?
wine-bugs@winehq.com writes:
http://bugs.winehq.com/show_bug.cgi?id=740
*** shadow/740 Fri May 31 13:26:39 2002 --- shadow/740.tmp.7952 Fri May 31 13:26:50 2002
*** 251,253 **** --- 251,300 ----
------- Additional Comments From Speeddymon@yahoo.com 2002-05-31 13:26 ------- Adding Andriy to CC's
- ------- Additional Comments From Speeddymon@yahoo.com 2002-05-31 13:26 -------
 - ok, I have some info on the problem...
 - here is basically what happens:
 - fgBits gets initialized ;)
 - fgBits gets set to zero
 - then things screw up...
 - but you knew that I know, just keep reading...
 - 2 lines below where fgBits gets set to zero, xmax gets set to whatever,
 - possibly zero, same with ymax...
 - then we run a for on y=0 and compare it to ymax
 - inside there we run a for on x=0 and compare it to xmax...
 - then theres a switch that may be important to this bug
 - and then the crucial if (red+green+blue > threshold)
 - which is the only place that fgBits gets incremented before that divide by zero
 - error, so obviously 1 of 3 things is happening:
 
- ymax is being set to zero and so the for fails
 
- xmax is being set to zero and so the for fails
 
- red+green+blue is not being set high enough to pass the threshold if
 - and so fgBits++ isn't taking place...
 - now that I have looked back up at the switch, I see that lo and behold:
 - theChar = theImage[byteIndex++];
 - red = theChar;
 - and like david said above, the whole theImage array is failing...
 - now, since I don't have access to a Linux box ATM (i have to go home to access
 - it) I can't add my own trace messages to see what is causing theImage to fail,
 - but it looks like either
 
- byteIndex++ isn't working for some really weird reason
 
- byteIndex++ is working, but theImage[1] doesn't exist
 
- &theMask[ptr->nWidth/8 * ptr->nHeight]; isn't working...
 - So... I will add my stuff tonight and try to post the results tomorrow....
 - all of this information is against the current mouse.c, not rev 1.2 which is
 - the first version with this problem...
 \ No newline at end of file