X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswfabc.c;h=c1cbdedc11c0ab4f609fa17ddd0dd1c94b2d9416;hb=db09f56c8f648428f2019acbb40298fe987d6e97;hp=c2d566f437afc0fa4d361fdf9f4a6447297d410e;hpb=99f17fbc56f64e4960e9399d2f33b2bcf7b22b0c;p=swftools.git diff --git a/lib/modules/swfabc.c b/lib/modules/swfabc.c index c2d566f..c1cbded 100644 --- a/lib/modules/swfabc.c +++ b/lib/modules/swfabc.c @@ -650,7 +650,6 @@ opcode_t opcodes[]={ {0x0d, "ifnle", "j"}, {0x0c, "ifnlt", "j"}, {0x14, "ifne", "j"}, -{0x14, "ifne", "j"}, {0x19, "ifstricteq", "j"}, {0x1a, "ifstrictne", "j"}, {0x11, "iftrue", "j"}, @@ -689,7 +688,7 @@ opcode_t opcodes[]={ {0x1d, "popscope", ""}, {0x24, "pushbyte", "b"}, {0x2f, "pushdouble", "u"}, //index into floats -{0x27, "pushtrue", ""}, +{0x27, "pushfalse", ""}, {0x2d, "pushint", "u"}, //index into ints {0x31, "pushnamespace", "u"}, //index into namespace {0x28, "pushnan", ""}, @@ -917,9 +916,9 @@ abc_file_t*abc_file_new() memset(f, 0, sizeof(abc_file_t)); f->ints = dict_new(); - dict_append(f->ints, 0, (void*)0); + dict_append(f->ints, 0, (void*)(ptroff_t)0); f->uints = dict_new(); - dict_append(f->uints, 0, (void*)0); + dict_append(f->uints, 0, (void*)(ptroff_t)0); f->floats = dict_new(); dict_append(f->floats, 0, 0); f->strings = dict_new(); @@ -974,7 +973,7 @@ void swf_DissassembleABC(TAG*tag) for(t=1;tints, 0, (void*)v); + dict_append(pool->ints, 0, (void*)(ptroff_t)v); } int num_uints = swf_GetU30(tag); @@ -982,7 +981,7 @@ void swf_DissassembleABC(TAG*tag) for(t=1;tuints, 0, (void*)v); + dict_append(pool->uints, 0, (void*)(ptroff_t)v); } int num_floats = swf_GetU30(tag); @@ -1009,7 +1008,7 @@ void swf_DissassembleABC(TAG*tag) U8 type = swf_GetU8(tag); int namenr = swf_GetU30(tag); const char*name = dict_getstr(pool->strings, namenr); - dict_append(pool->namespaces, name, (void*)(int)type); + dict_append(pool->namespaces, name, (void*)(ptroff_t)type); int w = 0; DEBUG w=1; if(w) { @@ -1057,7 +1056,7 @@ void swf_DissassembleABC(TAG*tag) if(type==0x07 || type==0x0d) { int nr1 = swf_GetU30(tag); const char*namespace = dict_getstr(pool->namespaces, nr1); - U8 access = (U8)(int)dict_getdata(pool->namespaces, nr1); + U8 access = (U8)(ptroff_t)dict_getdata(pool->namespaces, nr1); const char*methodname = dict_getstr(pool->strings, swf_GetU30(tag)); DEBUG printf("multiname %d) <%s> %s:%s\n", t, access2str(access), namespace, methodname); mname = malloc(strlen(namespace)+strlen(methodname)+300); @@ -1304,13 +1303,13 @@ static int registerNameSpace(abc_file_t*file, U8 access, char*name) { int t; for(t=0;tnamespaces->num;t++) { const char*name2 = dict_getstr(file->namespaces, t); - U8 access2 = (U8)(int)dict_getdata(file->namespaces, t); + U8 access2 = (U8)(ptroff_t)dict_getdata(file->namespaces, t); if(access == access2 && !strcmp(name, name2)) { return t; } } dict_update(file->strings, name, 0); - return dict_append(file->namespaces, name, (void*)(int)access); + return dict_append(file->namespaces, name, (void*)(ptroff_t)access); } int abc_RegisterNameSpace(abc_file_t*file, char*name) { return registerNameSpace(file, 0x08, name); @@ -1533,7 +1532,7 @@ void swf_WriteABC(TAG*tag, abc_file_t*abc) } swf_SetU30(tag, abc->namespaces->num>1?abc->namespaces->num:0); for(t=1;tnamespaces->num;t++) { - U8 type = (U8)(int)dict_getdata(abc->namespaces, t); + U8 type = (U8)(ptroff_t)dict_getdata(abc->namespaces, t); const char*name = dict_getstr(abc->namespaces, t); int i = dict_find(abc->strings, name); if(i<0) {