X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswfshape.c;h=b53e2e86cc0a22f43117eac019f1a2ddfe7daab0;hb=68c030bfb760590c72d65dd94da6b704287dcda2;hp=6ef8aa2125f80ce32c9eece2783af2360af28857;hpb=f1d2b6c34d9ecedbd0766f16272162b66196142b;p=swftools.git diff --git a/lib/modules/swfshape.c b/lib/modules/swfshape.c index 6ef8aa2..b53e2e8 100644 --- a/lib/modules/swfshape.c +++ b/lib/modules/swfshape.c @@ -418,8 +418,8 @@ 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 + 4) { - /* do not split into more than 16 segments. If the line is *that* long, something's broken */ + 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); return -1; } else { @@ -749,17 +749,26 @@ SRECT swf_GetShapeBoundingBox(SHAPE2*shape2) void swf_Shape2Free(SHAPE2 * s) { SHAPELINE*line = s->lines; + s->lines = 0; while(line) { SHAPELINE*next = line->next; + line->next = 0; rfx_free(line); line = next; } - if(s->linestyles) + + if(s->linestyles) { rfx_free(s->linestyles); - if(s->fillstyles) + s->linestyles = 0; + } + if(s->fillstyles) { rfx_free(s->fillstyles); - if(s->bbox) + s->fillstyles = 0; + } + if(s->bbox) { rfx_free(s->bbox); + s->bbox = 0; + } } SHAPE2* swf_Shape2Clone(SHAPE2 * s)