X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fgfxpoly%2Fpoly.c;h=2be5efb9dd89647f23d00fd54af91fe7eb98ad31;hb=a8a2650b187181ff507303ff9cf181427445255a;hp=efb51fe656e2038c07d975e67eab5e9e81fc9c51;hpb=2cdbdbb4012575119c1a92e9c4662df9f4e81737;p=swftools.git diff --git a/lib/gfxpoly/poly.c b/lib/gfxpoly/poly.c index efb51fe..2be5efb 100644 --- a/lib/gfxpoly/poly.c +++ b/lib/gfxpoly/poly.c @@ -167,6 +167,7 @@ int gfxpoly_size(gfxpoly_t*poly) char gfxpoly_check(gfxpoly_t*poly) { + current_polygon = poly; dict_t*d = dict_new2(&point_type); int s,t; gfxpolystroke_t*stroke = poly->strokes; @@ -304,6 +305,11 @@ static void segment_init(segment_t*s, int32_t x1, int32_t y1, int32_t x2, int32_ s->nr = segment_count++; #ifdef CHECKS + /* notice: on some systems (with some compilers), for the line + (1073741823,-1073741824)->(1073741823,1073741823) + we get LINE_EQ(s->a, s) == 1. + That's why we now clamp to 26 bit. + */ assert(LINE_EQ(s->a, s) == 0); assert(LINE_EQ(s->b, s) == 0);