Skip to content

Commit cea6b9a

Browse files
committed
Remember to open files in binary mode to avoid stupid translation issues.
1 parent c25cd39 commit cea6b9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/src/input/inp_pkg.body

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ int InsertFile(char *filnam, char *table[], char **result)
259259
else {
260260
if (table == 0 || filnam[0] == '/') {
261261
/* don't look in the table! */
262-
fd = fopen(filnam, "r");
262+
fd = fopen(filnam, "rb");
263263
if (!fd) return 0;
264264
}
265265
else {
@@ -268,7 +268,7 @@ int InsertFile(char *filnam, char *table[], char **result)
268268
if (!INP_mk_filename(*table++, filnam, &newfn)) {
269269
return 0;
270270
}
271-
fd = fopen(newfn, "r");
271+
fd = fopen(newfn, "rb");
272272
if (fd) {
273273
/* free filnam ??? NO we don't know
274274
where it comes from!

0 commit comments

Comments
 (0)