patch from simon-swf@munton.demon.co.uk, fixes for:
authorkramm <kramm>
Fri, 3 Sep 2004 18:37:37 +0000 (18:37 +0000)
committerkramm <kramm>
Fri, 3 Sep 2004 18:37:37 +0000 (18:37 +0000)
* The hexdump output only displays the first 15 ASCII characters.
* The DOINITACTION section dump doesn't display the action codes.

src/swfdump.c

index 0d4babc..6256e49 100644 (file)
@@ -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);
        }