X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswfshape.c;h=deb9b3a6b858345d71ba3f1d5abb8b6d0cebb3d3;hb=3e8c263456822a1f6d47ac7ac2133b2d631f2431;hp=bcca89f214608a767e3b19154bb1f0e770d283a7;hpb=ab2f7a4cd0eda09ff3af29058c45d098f869b598;p=swftools.git diff --git a/lib/modules/swfshape.c b/lib/modules/swfshape.c index bcca89f..deb9b3a 100644 --- a/lib/modules/swfshape.c +++ b/lib/modules/swfshape.c @@ -425,9 +425,9 @@ int swf_ShapeSetLine(TAG * t,SHAPE * s,S32 x,S32 y) b = swf_CountBits(y,b); if (b<2) b=2; if(b >= 18) { - if(b >= 18 + 6) { + if(b > 18 + 6) { /* do not split into more than 64 segments. If the line is *that* long, something's broken */ - fprintf(stderr, "Warning: Line to %.2f,%.2f is too long\n", (double)x,(double)y); + fprintf(stderr, "Warning: Line to %.2f,%.2f is too long (%d bits)\n", (double)x,(double)y, b); return -1; } else { /* split line */ @@ -474,7 +474,7 @@ int swf_ShapeSetCurve(TAG * t,SHAPE * s,S32 x,S32 y,S32 ax,S32 ay) if(b >= 18) { fprintf(stderr, "Bit overflow in swf_ShapeSetCurve- %d (%d,%d,%d,%d)\n", b, ax,ay,x,y); - b = 17; + return swf_ShapeSetLine(t, s, x+ax, y+ay); } swf_SetBits(t,2,2);