From 46afeff995a5c1e7ec32b6770a8aa5e05e14a2e2 Mon Sep 17 00:00:00 2001 From: kramm Date: Mon, 22 Apr 2002 13:07:05 +0000 Subject: [PATCH] * bugfixes * slight changes to -e format. --- src/swfdump.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/swfdump.c b/src/swfdump.c index a6c0f78..f2752d1 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -315,7 +315,6 @@ void printhandlerflags(U16 handlerflags) void handlePlaceObject2(TAG*tag, char*prefix) { U8 flags = swf_GetU8(tag); - printf("flags: %02x", flags); swf_GetU16(tag); //depth //flags&1: move if(flags&2) swf_GetU16(tag); //id @@ -398,9 +397,9 @@ int main (int argc,char ** argv) int f; int xsize,ysize; char issprite = 0; // are we inside a sprite definition? - int spriteframe; + int spriteframe = 0; int mainframe=0; - char* spriteframelabel; + char* spriteframelabel = 0; char* framelabel = 0; char prefix[128]; int filesize = 0; @@ -463,20 +462,28 @@ int main (int argc,char ** argv) } if(html) { + char*fileversions[] = {"","1,0,0,0", "2,0,0,0","3,0,0,0","4,0,0,0", + "5,0,0,0","6,0,23,0","7,0,0,0","8,0,0,0"}; + if(swf.fileVersion>8) { + fprintf(stderr, "Fileversion>8\n"); + exit(1); + } printf("\n" + " CODEBASE=\"http://active.macromedia.com/flash5/cabs/swflash.cab#version=%s\">\n" " \n" " \n" " \n" " \n" - " \n" + " PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\">\n" " \n" - "\n", xsize, ysize, swf.fileVersion, filename, filename, xsize, ysize); + "\n", xsize, ysize, fileversions[swf.fileVersion], + filename, filename, xsize, ysize); return 0; } printf("[HEADER] File version: %d\n", swf.fileVersion); -- 1.7.10.4