Outputed swf was corrupt on Windows
[swftools.git] / lib / example / sound.c
index 2c0d892..de86113 100644 (file)
@@ -70,7 +70,7 @@ int main (int argc,char ** argv)
   
   tag = swf_InsertTag(tag, ST_END);
 
-  f = open("sound.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644);
+  f = open("sound.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);