diff options
author | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-08-19 01:27:16 +0200 |
---|---|---|
committer | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-08-19 01:27:36 +0200 |
commit | d0f2a6541f90cb915b0733ac188c7e0cb332e970 (patch) | |
tree | 192611f1230b53eaed5ac59639178c73e9878cc8 /src | |
parent | 52f28c38d0d1d7d6036495b3ecadf3cd82dd1e50 (diff) |
toilet: output of ftell is only meaningful for binary files
per cppreference.com
Diffstat (limited to 'src')
-rw-r--r-- | src/toilet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/toilet.c b/src/toilet.c index 74cafb2..aab9dcc 100644 --- a/src/toilet.c +++ b/src/toilet.c @@ -143,7 +143,7 @@ static size_t get_count(enum MODE mode, char *fname, FILE *f) { } static int process(char *fname, bool isstdin) { - FILE *f = isstdin ? stdin : fopen(fname, "r"); + FILE *f = isstdin ? stdin : fopen(fname, "rb"); for (enum MODE mode = 1; mode <= M_BYTES; mode <<= 1) { if (mode & modeMap) { |