From 02c13264439ceeaee31c9a61a0ea99230945f663 Mon Sep 17 00:00:00 2001 From: kramm Date: Mon, 9 Jun 2008 10:29:52 +0000 Subject: [PATCH] cut frames *after* writing instances, only cut non-define tags --- src/swfc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/swfc.c b/src/swfc.c index eb18eba..ee86802 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -816,7 +816,8 @@ TAG* removeFromTo(TAG*from, TAG*to) TAG*save = from->prev; while(from!=to) { TAG*next = from->next; - swf_DeleteTag(from); + if(swf_isAllowedSpriteTag(from)) + swf_DeleteTag(from); from = next; } save->next = 0; @@ -953,9 +954,6 @@ static void s_endSprite() { SRECT r = currentrect; - if(stack[stackpos].cut) - tag = removeFromTo(stack[stackpos].cut, tag); - stackpos--; instance_t *i; stringarray_t* index =dictionary_index(&instances); @@ -970,6 +968,9 @@ static void s_endSprite() } } + if(stack[stackpos].cut) + tag = removeFromTo(stack[stackpos].cut, tag); + // the writeInstance loop above may have inserted tags after what used yo be the current tag, // so let's make sure 'tag' point to the current tag again. while (tag->next) -- 1.7.10.4