Author: matt
Date: 2010-12-06 15:25:52 -0800 (Mon, 06 Dec 2010)
New Revision: 7968
Log:
Ooops, Fl_Text_Buffer::insertfile must read in binary format, or it will screw 
up line endings! (Actually, this could be debated, but by reading and writing 
in binary format, the file integrity would remain)

Modified:
   branches/branch-1.3/src/Fl_Text_Buffer.cxx

Modified: branches/branch-1.3/src/Fl_Text_Buffer.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Text_Buffer.cxx  2010-12-06 23:23:44 UTC (rev 
7967)
+++ branches/branch-1.3/src/Fl_Text_Buffer.cxx  2010-12-06 23:25:52 UTC (rev 
7968)
@@ -1521,7 +1521,7 @@
 int Fl_Text_Buffer::insertfile(const char *file, int pos, int /*buflen*/)
 {
   FILE *fp;
-  if (!(fp = fl_fopen(file, "r")))
+  if (!(fp = fl_fopen(file, "rb")))
     return 1;
   fseek(fp, 0, SEEK_END);
   size_t filesize = ftell(fp);

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to