X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fswfc.c;h=fafa388df28b095ddfde30adbed6be8eb44e6f0d;hb=a319d13b0bf3bf2def6ed7acd325872224e1589a;hp=eb18eba7a85aedbf224f7db805386abe72698af2;hpb=30fd4b7cab65b9303875045e08c215f44463282a;p=swftools.git diff --git a/src/swfc.c b/src/swfc.c index eb18eba..fafa388 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(0, 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) @@ -2417,7 +2418,7 @@ int parseTwip(char*str) char*p = str; int val = 0; char ex = 0; - char*lastpos = str; + char*lastpos = 0; while(*p) { if(*p == '+' || *p == '-' || *p == '/' || *p == '*') ex = *p;