X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fmodules%2Fswftext.c;h=b0d3de5be79bac50236047895cc118c3b2353050;hp=a01e10b737448876545f7c2fc10a3b57c9d8e067;hb=ac58a40c594fa441eb4192cc4c86068372a7f18e;hpb=ffc27a3f45bc8f6334049a868bfd3457717f43f3 diff --git a/lib/modules/swftext.c b/lib/modules/swftext.c index a01e10b..b0d3de5 100644 --- a/lib/modules/swftext.c +++ b/lib/modules/swftext.c @@ -1187,7 +1187,7 @@ SWFFONT *swf_ReadFont(char *filename) SWF swf; if (!filename) return 0; - f = open(filename, O_RDONLY); + f = open(filename, O_RDONLY|O_BINARY); if (f < 0 || swf_ReadSWF(f, &swf) < 0) { fprintf(stderr, "%s is not a valid SWF font file or contains errors.\n", filename); @@ -1360,7 +1360,7 @@ void swf_WriteFont(SWFFONT * font, char *filename) t = swf_InsertTag(t, ST_END); - f = open(filename, O_RDWR | O_CREAT | O_TRUNC, 0644); + f = open(filename, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0644); if FAILED (swf_WriteSWF(f, &swf)) fprintf(stderr, "WriteSWF() failed in writeFont().\n"); close(f);