fixed format warnings
[swftools.git] / src / swfdump.c
index acc1806..0828ea4 100644 (file)
@@ -609,7 +609,7 @@ void handleVideoFrame(TAG*tag, char*prefix)
 
     deblock = swf_GetBits(tag, 1);
     if(deblock)
-       printf(" deblock ", deblock);
+       printf(" deblock %d ", deblock);
     quantizer = swf_GetBits(tag, 5);
     printf(" quant: %d ", quantizer);
 }
@@ -1016,15 +1016,18 @@ static void handleFontAlign2(TAG*tag, char*prefix)
        printf("%sglyph %d) ", prefix, num);
        int nr = swf_GetU8(tag); // should be 2
        int t;
-       for(t=0;t<nr;t++) {
+       for(t=0;t<2;t++) {
            // pos
            float v = swf_GetF16(tag);
            printf("%f ", v*1024.0);
        }
-       for(t=0;t<nr;t++) {
-           // width
-           float v = swf_GetF16(tag);
-           printf("+%f ", v*1024.0);
+       int s;
+       for(s=0;s<nr-1;s++) {
+           for(t=0;t<2;t++) {
+               // width
+               float v = swf_GetF16(tag);
+               printf("+%f ", v*1024.0);
+           }
        }
        U8 xyflags = swf_GetU8(tag);
        printf("xy:%02x\n", xyflags);
@@ -1229,7 +1232,7 @@ int main (int argc,char ** argv)
        else
            printf("\n");
     }
-    printf("[HEADER]        File size: %ld%s\n", swf.fileSize, swf.compressed?" (Depacked)":"");
+    printf("[HEADER]        File size: %d%s\n", swf.fileSize, swf.compressed?" (Depacked)":"");
     printf("[HEADER]        Frame rate: %f\n",swf.frameRate/256.0);
     printf("[HEADER]        Frame count: %d\n",swf.frameCount);
     printf("[HEADER]        Movie width: %.2f",(swf.movieSize.xmax-swf.movieSize.xmin)/20.0);
@@ -1266,9 +1269,9 @@ int main (int argc,char ** argv)
        }
        if(cumulative) {
            filepos += tag->len;
-           printf("[%03x] %9ld %9ld %s%s", tag->id, tag->len, filepos, prefix, swf_TagGetName(tag));
+           printf("[%03x] %9d %9d %s%s", tag->id, tag->len, filepos, prefix, swf_TagGetName(tag));
        } else {
-           printf("[%03x] %9ld %s%s", tag->id, tag->len, prefix, swf_TagGetName(tag));
+           printf("[%03x] %9d %s%s", tag->id, tag->len, prefix, swf_TagGetName(tag));
        }
        
         if(tag->id == ST_PLACEOBJECT) {