mrkite/minutor — Issue #1: crash w/depth shading when y=1
Author: btb
Created: 2012-03-09 01:31:43+00:00
State: open

Crashes with divide by zero error when y=1 and depth shading is on. Obviously because I changed
int num=prevy+50-(128-y)/5;
int denom=y+50-(128-y)/5;
to
int num=prevy+50-(256-y)/5;
int denom=y+50-(256-y)/5;
without really understanding why those constants were chosen.
changing the 256 back to 128 works fine. changing the 50 to 76 has the same effect.
making num=prevy and denom=y also works, so do whatever makes sense to you.