X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fmodules%2Fswftools.c;fp=lib%2Fmodules%2Fswftools.c;h=426ea41cd828f45c152545c18854cd59b3411d32;hp=e7e03f6646050e37f2c0be6df1a9341dcf35138c;hb=4a566feb5f1074db505f5f8a78c7fdf487d94b9a;hpb=0f54ba811030f2579cce874ef577e36d1c75270b diff --git a/lib/modules/swftools.c b/lib/modules/swftools.c index e7e03f6..426ea41 100644 --- a/lib/modules/swftools.c +++ b/lib/modules/swftools.c @@ -686,7 +686,7 @@ void enumerateUsedIDs(TAG * tag, int base, void (*callback)(TAG*, int, void*), v /* I never saw recursive sprites, but they are (theoretically) possible, so better add base here again */ enumerateUsedIDs(tag2, tag->pos + base, callback, callback_data); - swf_DeleteTag(tag2); + swf_DeleteTag(0, tag2); swf_GetBlock(tag, NULL, len); } } @@ -1268,9 +1268,7 @@ void swf_Optimize(SWF*swf) /* we found two identical tags- remap one of them */ remap[id] = swf_GetDefineID(tag2); - swf_DeleteTag(tag); - if(tag == swf->firstTag) - swf->firstTag = next; + swf_DeleteTag(swf, tag); } } else if(swf_isPseudoDefiningTag(tag)) { int id = swf_GetDefineID(tag); @@ -1278,9 +1276,7 @@ void swf_Optimize(SWF*swf) /* if this tag was remapped, we don't need the helper tag anymore. Discard it. */ - swf_DeleteTag(tag); - if(tag == swf->firstTag) - swf->firstTag = next; + swf_DeleteTag(swf, tag); } }