mirror of
https://github.com/fltk/fltk.git
synced 2026-05-25 09:17:49 +08:00
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)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1521,7 +1521,7 @@ int Fl_Text_Buffer::findchar_backward(int startPos, unsigned int searchChar,
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user