X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=src%2Fswfc.c;h=75a12ae7be211d992540e5a3adb145d5785db720;hb=59fc08ccbcddc4155d463231dec7e5a4f7cd0b64;hp=3a2f7ed29db67f21a91123d4f0e48fd6bceda05b;hpb=6e9435d4bcafbe6aac9c04ede599cc4d564c4241;p=swftools.git diff --git a/src/swfc.c b/src/swfc.c index 3a2f7ed..75a12ae 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -642,8 +642,11 @@ static void s_endSWF() swf = stack[stackpos].swf; filename = stack[stackpos].filename; - + + //if(tag->prev && tag->prev->id != ST_SHOWFRAME) + // tag = swf_InsertTag(tag, ST_SHOWFRAME); tag = swf_InsertTag(tag, ST_SHOWFRAME); + tag = swf_InsertTag(tag, ST_END); swf_OptimizeTagOrder(swf); @@ -699,7 +702,7 @@ void s_close() int s_getframe() { - return currentframe; + return currentframe+1; } void s_frame(int nr, int cut, char*name) @@ -707,13 +710,9 @@ void s_frame(int nr, int cut, char*name) int t; TAG*now = tag; - /* // enabling the following code will make the frame - handling much more intuitive, but also break old - code: - - if(nr<1) - syntaxerror("Frame number need to be at least 1"); - nr--;*/ + if(nr<1) + syntaxerror("Illegal frame number"); + nr--; // internally, frame 1 is frame 0 for(t=currentframe;t= frame - && !(frame==0 && s_getframe()==frame)) // equality is o.k. for frame 0 + && !(frame==1 && s_getframe()==frame)) // equality is o.k. for frame 0 syntaxerror("frame expression must be >%d (is:%s)", s_getframe(), framestr); } s_frame(frame, cut, name);