Outputed swf was corrupt on Windows
[swftools.git] / lib / example / text.c
index 6bfe13a..d684c0e 100644 (file)
@@ -142,7 +142,7 @@ int main(int argc, char ** argv)
 //  swf_WriteCGI(&swf);
  
 
-  f = open("text.swf",O_RDWR|O_CREAT|O_TRUNC,0644);
+  f = open("text.swf",O_RDWR|O_CREAT|O_TRUNC|O_BINARY,0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);