From 460cc8cdc3265a2fef3deec215b0ae9dabdda761 Mon Sep 17 00:00:00 2001 From: kramm Date: Fri, 3 Sep 2004 18:37:37 +0000 Subject: [PATCH] patch from simon-swf@munton.demon.co.uk, fixes for: * The hexdump output only displays the first 15 ASCII characters. * The DOINITACTION section dump doesn't display the action codes. --- src/swfdump.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/swfdump.c b/src/swfdump.c index 0d4babc..6256e49 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -676,9 +676,9 @@ void hexdumpTag(TAG*tag, char* prefix) ascii[t&15] = printable(tag->data[t]); if((t && ((t&15)==15)) || (t==tag->len-1)) { - int s,p=((t-1)&15)+1; + int s,p=((t)&15)+1; ascii[p] = 0; - for(s=p;s<16;s++) { + for(s=p-1;s<16;s++) { printf(" "); } if(t==tag->len-1) @@ -1073,6 +1073,12 @@ int main (int argc,char ** argv) actions = swf_ActionGet(tag); swf_DumpActions(actions, myprefix); } + else if(tag->id == ST_DOINITACTION && action) { + ActionTAG*actions; + swf_GetU16(tag); // id + actions = swf_ActionGet(tag); + swf_DumpActions(actions, myprefix); + } else if(tag->id == ST_DEFINEBUTTON && action) { dumpButtonActions(tag, myprefix); } -- 1.7.10.4