ext/Tioga/FigureMaker/shared/pdffile.c in tioga-1.16 vs ext/Tioga/FigureMaker/shared/pdffile.c in tioga-1.17
- old
+ new
@@ -191,10 +191,10 @@
next_available_shade_number = 1;
writing_file = true;
time_t now = time(NULL);
char ofile[300], timestring[100];
Get_pdf_name(ofile, filename, 300);
- if ((OF = fopen(ofile, "w")) == NULL) {
+ if ((OF = fopen(ofile, "wb")) == NULL) { /* Write binary file ! */
RAISE_ERROR_s("Sorry: can't open %s.\n", filename, ierr);
return;
}
if ((TF = tmpfile()) == NULL) {
RAISE_ERROR_s("Sorry: can't create temp file for writing PDF file %s.\n",