X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=src%2Fswfc.c;fp=src%2Fswfc.c;h=377b531b22dcfdb3decaefff410c857b67cc6fdb;hp=a8cbdfcaf3dac7f91f825c1d48916ec5127d0978;hb=b32d09223362d5acdf3269b9ddabc454648327fc;hpb=b9defa00b311aa41a07618e366ac5f764ddf4333 diff --git a/src/swfc.c b/src/swfc.c index a8cbdfc..377b531 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -766,6 +766,10 @@ void s_buttonaction(int flags, char*action) if(flags==0) { return; } + if(!stackpos || !stack[stackpos-1].tag || + stack[stackpos-1].tag->id != ST_DEFINEBUTTON2) { + syntaxerror("Need to be inside a button for .on_* commands"); + } setbuttonrecords(stack[stackpos-1].tag); a = swf_ActionCompile(text, stack[0].swf->fileVersion); @@ -2537,7 +2541,6 @@ static double parseExpression(char*s) int parseTwip(char*str) { int v = (int)(parseExpression(str)*20); - printf("%s = %.2f\n", str, v/20.0); return v; }