X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fpool.c;h=54609d0f23bcc3485c4644d4604f6f6b276d16a1;hb=9ee97b0258700c746404edfcd9640a0a327eb21f;hp=d2963b08b49ee1d941b15776deb7b2c0c35d9085;hpb=687b6d7f48dc931a1a7d04373414db61940fe11b;p=swftools.git diff --git a/lib/as3/pool.c b/lib/as3/pool.c index d2963b0..54609d0 100644 --- a/lib/as3/pool.c +++ b/lib/as3/pool.c @@ -189,8 +189,7 @@ char* namespace_tostring(namespace_t*ns) else if(!*s) sprintf(string, "[%s]\"\"", access, s); else - sprintf(string, "[%s]", access, s); - + sprintf(string, "[%s]%s", access, s); free(s); return string; } @@ -567,7 +566,7 @@ char* multiname_tostring(multiname_t*m) strcat(mname,s); free(s); } else { - fprintf(stderr, "Invalid multiname type: %02x\n", m->type); + return strdup(""); } free(name); return mname; @@ -1144,6 +1143,12 @@ void pool_read(pool_t*pool, TAG*tag) for(t=1;tdata[tag->pos+s]); + printf("\n");*/ + m.type = swf_GetU8(tag); if(m.type==0x07 || m.type==0x0d) { int namespace_index = swf_GetU30(tag); @@ -1165,6 +1170,17 @@ void pool_read(pool_t*pool, TAG*tag) } else if(m.type==0x1b || m.type==0x1c) { int namespace_set_index = swf_GetU30(tag); m.namespace_set = (namespace_set_t*)array_getkey(pool->x_namespace_sets, namespace_set_index); + } else if(m.type==0x1d) { + int v1 = swf_GetU30(tag); + int v2 = swf_GetU30(tag); + int v3 = swf_GetU30(tag); + //printf("%02x %02x %02x\n", v1, v2, v3); + m.type = 0x07; + m.namespace_set = 0; + m.name = pool_lookup_string(pool, v1); + m.ns = pool_lookup_namespace(pool, v2); + /* not sure what to do with v3- + it's definitely not a namespace */ } else { printf("can't parse type %d multinames yet\n", m.type); }