more horizontal refactoring
[swftools.git] / lib / modules / swftools.c
index 42279bb..6baecd1 100644 (file)
@@ -584,10 +584,13 @@ void enumerateUsedIDs(TAG * tag, int base, void (*callback)(TAG*, int, void*), v
        case ST_DEFINEBUTTONSOUND: {
            int t;
            callback(tag, tag->pos + base, callback_data);
+           swf_GetU16(tag); //button id
            for(t=0;t<4;t++) {
                int flags;
                callback(tag, tag->pos + base, callback_data);
-               swf_GetU16(tag); //sound id
+               U16 sound_id = swf_GetU16(tag); //sound id
+               if(!sound_id)
+                   continue;
                flags = swf_GetU8(tag);
                if(flags&1)
                    swf_GetU32(tag); // in point
@@ -643,7 +646,6 @@ void enumerateUsedIDs(TAG * tag, int base, void (*callback)(TAG*, int, void*), v
 
        case ST_FREECHARACTER: /* unusual tags, which all start with an ID */
        case ST_NAMECHARACTER:
-       case ST_DEFINEBINARY:
        case ST_DEFINEFONTNAME:
        case ST_GENERATORTEXT:
            callback(tag, tag->pos + base, callback_data);
@@ -1166,6 +1168,7 @@ U8 swf_isFontTag(TAG*tag)
 {
     if(tag->id == ST_DEFINEFONT ||
        tag->id == ST_DEFINEFONT2 ||
+       tag->id == ST_DEFINEFONT3 ||
        tag->id == ST_DEFINEFONTINFO)
         return 1;
     return 0;