diff --git a/src/devctxt.c b/src/devctxt.c index 130b7de..f6fb92b 100755 --- a/src/devctxt.c +++ b/src/devctxt.c @@ -76,14 +76,14 @@ static BOOL line_clip(PINT32 output, INT32 x1, INT32 y1, INT32 x2, INT32 y2, INT else if (outcode1 & 0x2) { tmp = M(y2 - y1, D(xmax - x1, x2 - x1)); - y1 -= tmp; + y1 += tmp; x1 = xmax; Log(LDEBUG, "clipped against right to point (%d, %d), dy=%d/%d", x1 >> CPX, y1 >> CPX, tmp >> CPX, tmp); } else if (outcode1 & 0x1) { tmp = M(y2 - y1, D(xmin - x1, x2 - x1)); - y1 -= tmp; + y1 += tmp; x1 = xmin; Log(LDEBUG, "clipped against left to point (%d, %d), dy=%d/%d", x1 >> CPX, y1 >> CPX, tmp >> CPX, tmp); }