From 3a6bca721cad44853f77a3e76f937d0ef5ff7bf5 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Fri, 13 Feb 2009 15:58:39 +0100 Subject: [PATCH] better support for undocumented type 0x1d --- lib/as3/pool.c | 17 ++++++----------- lib/as3/pool.h | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/as3/pool.c b/lib/as3/pool.c index 54609d0..bedc23b 100644 --- a/lib/as3/pool.c +++ b/lib/as3/pool.c @@ -521,7 +521,7 @@ char* multiname_tostring(multiname_t*m) char*name = m->name?escape_string(m->name):strdup("*"); int namelen = strlen(name); - if(m->type==QNAME || m->type==QNAMEA) { + if(m->type==QNAME || m->type==QNAMEA || m->type==POSTFIXTYPE) { char*nsname = escape_string(m->ns->name); mname = malloc(strlen(nsname)+namelen+32); strcpy(mname, "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 */ + int v1 = swf_GetU30(tag); //multiname + int v2 = swf_GetU30(tag); //counter? + int v3 = swf_GetU30(tag); //multiname + // e.g. Vector ... we only store the parent object + m = *(multiname_t*)array_getkey(pool->x_multinames, v1); } else { printf("can't parse type %d multinames yet\n", m.type); } diff --git a/lib/as3/pool.h b/lib/as3/pool.h index 0d0cec5..06fff75 100644 --- a/lib/as3/pool.h +++ b/lib/as3/pool.h @@ -120,7 +120,7 @@ typedef enum multiname_type RTQNAMELA=0x12, MULTINAMEA=0x0E, MULTINAMELA=0x1C, - MULTIX=0x1D + POSTFIXTYPE=0x1D } multiname_type_t; char* access2str(int type); -- 1.7.10.4