X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fabc.c;h=a0994e990626507efa25c020e867bd88fbb64349;hb=62a83d162b254d91da418cee25f5b87b067a3f92;hp=60ad6e7a4ee701d037088a1d1e14c6a0bc23af0c;hpb=fba89ddffff2fe50e3eebb708bf529bd2b1dafd2;p=swftools.git diff --git a/lib/as3/abc.c b/lib/as3/abc.c index 60ad6e7..a0994e9 100644 --- a/lib/as3/abc.c +++ b/lib/as3/abc.c @@ -284,11 +284,11 @@ trait_t* abc_class_staticslot(abc_class_t*cls, multiname_t*name, multiname_t*typ } -trait_t* abc_class_find_slotid(abc_class_t*cls, int slotid) +trait_t* traits_find_slotid(trait_list_t*traits, int slotid) { trait_list_t*l; trait_t*t=0; - for(l=cls->traits;l;l=l->next) { + for(l=traits;l;l=l->next) { if(l->trait->slot_id==slotid) { t=l->trait; break; @@ -949,6 +949,10 @@ static pool_t*writeABC(TAG*abctag, void*code, pool_t*pool) NEW(abc_method_body_t,body);array_append(file->method_bodies, NO_KEY, body); // don't bother to set m->index body->method = m; m->body = body; + if(c->superclass && c->superclass->name && strcmp(c->superclass->name,"Object")) { + __ getlocal_0(body); + __ constructsuper(body, 0); + } __ returnvoid(body); c->constructor = m; } else {