Skip to content

Commit

Permalink
Remember to open files in binary mode to avoid stupid translation iss…
Browse files Browse the repository at this point in the history
…ues.
  • Loading branch information
davidgiven committed Dec 9, 2024
1 parent c25cd39 commit cea6b9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/src/input/inp_pkg.body
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ int InsertFile(char *filnam, char *table[], char **result)
else {
if (table == 0 || filnam[0] == '/') {
/* don't look in the table! */
fd = fopen(filnam, "r");
fd = fopen(filnam, "rb");
if (!fd) return 0;
}
else {
Expand All @@ -268,7 +268,7 @@ int InsertFile(char *filnam, char *table[], char **result)
if (!INP_mk_filename(*table++, filnam, &newfn)) {
return 0;
}
fd = fopen(newfn, "r");
fd = fopen(newfn, "rb");
if (fd) {
/* free filnam ??? NO we don't know
where it comes from!
Expand Down

0 comments on commit cea6b9a

Please sign in to comment.