while(action)
{
ActionTAG*tmp;
- if(action->data && action->data != action->tmp)
+ if(action->data && action->data != action->tmp) {
rfx_free(action->data);
+ action->data = 0;
+ }
+ action->len = 0;
tmp = action;
action=action->next;
tmp->prev = 0;
tmp->parent = tmp;
}
- if(data || !len)
+ if(data || !len) {
tmp->data = data;
- else
+ } else {
tmp->data = tmp->tmp;
+ }
tmp->len = len;
tmp->op = op;
*(U8*)&atag->tmp[2] = index>>8;
return atag;
}
-ActionTAG* action_PushString(ActionTAG*atag, char*str)
+ActionTAG* action_PushString(ActionTAG*atag, const char*str)
{
int l = strlen(str);
char*ptr = (char*)rfx_alloc(l+2);
ActionTAG* action_PushInt(ActionTAG*atag, int i)
{
atag = swf_AddActionTAG(atag, ACTION_PUSH, 0, 5);
- *(U8*)atag->tmp = 7; //int
+ atag->tmp[0] = 7; //int
atag->tmp[1] = i;
atag->tmp[2] = i>>8;
atag->tmp[3] = i>>16;
char*ptr = strdup(label);
return swf_AddActionTAG(atag, ACTION_GOTOLABEL, (U8*)ptr, strlen(ptr));
}
-ActionTAG* action_GetUrl(ActionTAG*atag, char* url, char* label)
+ActionTAG* action_GetUrl(ActionTAG*atag, const char* url, char* label)
{
int l1= strlen(url);
int l2= strlen(label);