X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswfshape.c;h=850beadbd0038c8856308b526b9e957b0b863694;hb=0703a05cbcae0bec44d6f6cb6f2ec7910559f7bf;hp=caa9e909f5096a5a5e719e3a27321b6c2844199e;hpb=52f047882e8bbdd90d2b37efd374c7d1fc195734;p=swftools.git diff --git a/lib/modules/swfshape.c b/lib/modules/swfshape.c index caa9e90..850bead 100644 --- a/lib/modules/swfshape.c +++ b/lib/modules/swfshape.c @@ -293,7 +293,7 @@ int swf_ShapeAddFillStyle(SHAPE * s,U8 type,MATRIX * m,RGBA * color,U16 id_bitma if (!s->fillstyle.data) return -1; } - // set fillstyle (no gradients yet!) + // set fillstyle s->fillstyle.data[s->fillstyle.n].type = type; s->fillstyle.data[s->fillstyle.n].id_bitmap = id_bitmap; @@ -421,9 +421,8 @@ int swf_ShapeSetLine(TAG * t,SHAPE * s,S32 x,S32 y) b = swf_CountBits(y,b); if (b<2) b=2; if(b-2 >= 16) { - fprintf(stderr, "Bit overflow in swf_ShapeSetLine(1)- %d\n", b); + fprintf(stderr, "Bit overflow in swf_ShapeSetLine(1)- %d (%d,%d)\n", b, x,y); fflush(stdout); - *(int*)0 = 0xdead; b = 17; } swf_SetBits(t, b-2, 4); @@ -438,7 +437,7 @@ int swf_ShapeSetLine(TAG * t,SHAPE * s,S32 x,S32 y) if(b<2) b=2; if(b-2 >= 16) { - fprintf(stderr, "Bit overflow in swf_ShapeSetLine(2)- %d\n", b); + fprintf(stderr, "Bit overflow in swf_ShapeSetLine(2)- %d (%d)\n", b, y); b = 17; } swf_SetBits(t, b-2, 4); @@ -450,7 +449,7 @@ int swf_ShapeSetLine(TAG * t,SHAPE * s,S32 x,S32 y) if(b<2) b=2; if(b-2 >= 16) { - fprintf(stderr, "Bit overflow in swf_ShapeSetLine(3)- %d\n", b); + fprintf(stderr, "Bit overflow in swf_ShapeSetLine(3)- %d (%d)\n", b, x); b = 17; } swf_SetBits(t, b-2, 4); @@ -471,6 +470,11 @@ int swf_ShapeSetCurve(TAG * t,SHAPE * s,S32 x,S32 y,S32 ax,S32 ay) b = swf_CountBits(x,b); b = swf_CountBits(y,b); + if(b-2 >= 16) { + fprintf(stderr, "Bit overflow in swf_ShapeSetCurve- %d (%d,%d,%d,%d)\n", b, ax,ay,x,y); + b = 17; + } + swf_SetBits(t,b-2,4); swf_SetBits(t,x,b); swf_SetBits(t,y,b);