Skip to content

Commit

Permalink
Make read_file to read text file only.
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmakarov committed Jun 14, 2024
1 parent 39fae0a commit 14de6c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mir-tests/test-read.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
static char *read_file (const char *name) {
static char *read_file (const char *name) { /* we read only text files by this func */
FILE *f;
size_t flen, rlen;
char *str;

if ((f = fopen (name, "rb")) == NULL) {
if ((f = fopen (name, "r")) == NULL) {
perror (name);
exit (1);
}
Expand Down

0 comments on commit 14de6c7

Please sign in to comment.