X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfc.c;h=54b51ee34fcd8ed0e9e6b2e9ec7c5c70ab425a97;hb=f9a5a4d2a65708ee202e987e857556e9615a45d9;hp=70920df223fdd5b93d266927a0896d87a17ebc65;hpb=86b4050afbbe3e0c85370ba15186864cb1eec64f;p=swftools.git diff --git a/src/swfc.c b/src/swfc.c index 70920df..54b51ee 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -552,10 +552,24 @@ void s_buttonaction(int flags, char*action) swf_ActionFree(a); } +static void setactionend(TAG*tag) +{ + if(!mybutton.nr_actions) { + /* no actions means we didn't have an actionoffset, + which means we can't signal the end of the + buttonaction records, so, *sigh*, we have + to insert a dummy record */ + swf_SetU16(tag, 0); //offset + swf_SetU16(tag, 0); //condition + swf_SetU8(tag, 0); //action + } +} + static void s_endButton() { SRECT r; setbuttonrecords(stack[stackpos-1].tag); + setactionend(stack[stackpos-1].tag); stackpos--; swf_ButtonPostProcess(stack[stackpos].tag, mybutton.nr_actions);