prevent fpe (dv by 0)

SVN revision: 56191
This commit is contained in:
Carsten Haitzler 2011-01-16 12:04:40 +00:00
parent c2d14d60ec
commit 6a5adabb1c
1 changed files with 1 additions and 0 deletions

View File

@ -168,6 +168,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
FPc t256;
h = (p[e2].y - p[e1].y) >> FP; // height of edge
if (h < 1) h = 1;
t = (((y << FP) + (FP1 - 1)) - p[e1].y) >> FP;
x = p[e2].x - p[e1].x;
x = p[e1].x + ((x * t) / h);