X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fcode.c;h=237439230282116ec147b3146e8a5bc7aeefba84;hb=1325a5112e6a78ab648567fdc0b64ba352b9b8f9;hp=8a729d4464ef74e617ad92ad2d14055958e05b84;hpb=719f26744e38f9abbcadfc132b214dfd950a79fd;p=swftools.git diff --git a/lib/as3/code.c b/lib/as3/code.c index 8a729d4..2374392 100644 --- a/lib/as3/code.c +++ b/lib/as3/code.c @@ -1153,6 +1153,11 @@ code_t* cut_last_push(code_t*c) } else if(c->opcode == OPCODE_CALLSUPER) { c->opcode = OPCODE_CALLSUPERVOID; return c; + } else if(c->opcode == OPCODE_NEWOBJECT || + c->opcode == OPCODE_NEWARRAY) { + // we can discard these if they're not eating up stack parameters + if(!c->data[0]) + return code_cutlast(c); } else break;