From f9a5a4d2a65708ee202e987e857556e9615a45d9 Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 30 May 2004 16:17:22 +0000 Subject: [PATCH] fixed handling of buttons without any action. --- src/swfc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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); -- 1.7.10.4