X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fimport.c;h=b8a72365c33dc18b81817170127d5146390e5836;hb=dd5f16e46f47e5833d68c75ecde8f33e0d1997fd;hp=0fcba248094ae586b751be0ebda50edc66ee3417;hpb=85df2905e1d050077d079f2f59242aa5e8040eb0;p=swftools.git diff --git a/lib/as3/import.c b/lib/as3/import.c index 0fcba24..b8a7236 100644 --- a/lib/as3/import.c +++ b/lib/as3/import.c @@ -22,6 +22,8 @@ #include "import.h" #include "abc.h" #include "registry.h" +#include "common.h" +#include "common.h" #include "tokenizer.h" #include "../os.h" @@ -58,6 +60,7 @@ void as3_import_swf(char*filename) tag = tag->next; } + tag = swf->firstTag; /* pass 2 */ while(tag) { if(tag->id == ST_DOABC || tag->id == ST_RAWABC) { @@ -153,7 +156,7 @@ static void import_code(void*_abc, char*filename, int pass) c->flags |= FLAG_DYNAMIC; } return; - } + } for(t=0;tclasses->num;t++) { abc_class_t*cls = array_getvalue(abc->classes, t); @@ -242,8 +245,10 @@ static void import_code(void*_abc, char*filename, int pass) m = (memberinfo_t*)methodinfo_register_global(access, package, name); m->return_type = resolve_class(filename, "return type", trait->method->return_type); } else { - m = (memberinfo_t*)varinfo_register_global(access, package, name); - m->type = resolve_class(filename, "type", trait->type_name); + varinfo_t*v = varinfo_register_global(access, package, name); + v->type = resolve_class(filename, "type", trait->type_name); + v->value = constant_clone(trait->value); + m = (memberinfo_t*)v; } m->flags |= FLAG_BUILTIN; m->parent = 0;