summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/toilet.c2
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) {