+void action_fixjump(ActionMarker m1, ActionMarker m2)
+{
+ ActionTAG* a1 = m1.atag;
+ ActionTAG* a2 = m2.atag;
+ ActionTAG* a;
+ int len = 0;
+ int oplen = 0;
+ a = a1;
+
+ a = a->next; //first one is free
+ while(a && a!=a2)
+ {
+ len += ActionTagSize(a);
+ oplen ++;
+ a = a->next;
+ }
+ if(!a)
+ { len = 0;
+ oplen = 0;
+ a = a2;
+ while(a && a!=a1) {
+ len -= ActionTagSize(a);
+ oplen --;
+ a = a->next;
+ }
+ if(!a) {
+ fprintf(stderr, "action_fixjump: couldn't find second tag\n");
+ return;
+ }
+ len -= ActionTagSize(a);
+ oplen --;
+ }
+
+ if (a1->op == ACTION_IF || a1->op == ACTION_JUMP)
+ {
+ *(U16*)(a1->data) = SWAP16(len);
+ }
+ else if(a1->op == ACTION_WAITFORFRAME)
+ {
+ ((U8*)(a1->data))[2] = oplen;
+ }
+ else if(a1->op == ACTION_WAITFORFRAME2)
+ {
+ ((U8*)(a1->data))[0] = oplen;
+ }
+
+}
+
+