added dummy __continue__ opcode
[swftools.git] / lib / as3 / code.c
index 37339e5..aef16ed 100644 (file)
@@ -200,7 +200,8 @@ opcode_t opcodes[]={
 {0x53, "applytype", "n",       -1, 1, 0, OP_STACK_ARGS},
 
 /* dummy instruction. Warning: this one is not actually supported by flash */
-{0xff, "__break__", "",             0, 0, 0, OP_RETURN},
+{0xfe, "__continue__", "s",           0, 0, 0, OP_RETURN},
+{0xff, "__break__", "s",            0, 0, 0, OP_RETURN},
 };
 
 static U8 op2index[256] = {254};
@@ -1103,10 +1104,12 @@ code_t*code_dup(code_t*c)
 
 code_t*code_cutlast(code_t*c)
 {
+    if(!c) return c;
     assert(!c->next);
     code_t*prev = c->prev;
     c->prev = 0;
-    prev->next=0;
+    if(prev)
+        prev->next=0;
     code_free(c);
     return prev;
 }