From 9cceec23dd0f0a647e47d640add633cb98e6c99d Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 6 Nov 2001 20:18:34 +0000 Subject: [PATCH] * optimized a loop * ActionFree() implemented * new function names --- lib/modules/swfaction.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/modules/swfaction.c b/lib/modules/swfaction.c index 736583a..4c47d53 100644 --- a/lib/modules/swfaction.c +++ b/lib/modules/swfaction.c @@ -128,7 +128,7 @@ r: register (byte) }; static int definedactions = sizeof(actions)/sizeof(struct Action); -ActionTAG* swf_GetActions(TAG*tag) +ActionTAG* swf_ActionGet(TAG*tag) { U8 op = 1; int length; @@ -149,10 +149,8 @@ ActionTAG* swf_GetActions(TAG*tag) length = swf_GetU16(tag); if(length) { - int t; data = malloc(length); - for(t=0;tdata && action->data != action->tmp) + free(action->data); + tmp = action; + action=action->next; + free(tmp); + } +} + +void swf_ActionSet(TAG*tag, ActionTAG*action) { while(action) { -- 1.7.10.4