From c86ca1a9fc3bb8b09eb429458b2ecf68b62cd1de Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 6 Nov 2023 11:36:02 +0100 Subject: FLUID: '\r' (CR) is skipped when reading project files Project and code files are now always written with LF instead of CRLF, even on MSWindows machines. --- fluid/fluid.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fluid/fluid.cxx') diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 26bc5a500..fbfe5a870 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -946,7 +946,7 @@ bool new_project_from_template() { char line[1024], *ptr, *next; FILE *infile, *outfile; - if ((infile = fl_fopen(tname, "r")) == NULL) { + if ((infile = fl_fopen(tname, "rb")) == NULL) { fl_alert("Error reading template file \"%s\":\n%s", tname, strerror(errno)); set_modflag(0); @@ -954,7 +954,7 @@ bool new_project_from_template() { return false; } - if ((outfile = fl_fopen(cutfname(1), "w")) == NULL) { + if ((outfile = fl_fopen(cutfname(1), "wb")) == NULL) { fl_alert("Error writing buffer file \"%s\":\n%s", cutfname(1), strerror(errno)); fclose(infile); -- cgit v1.2.3