summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2016-03-26 12:20:28 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2016-03-26 12:20:28 +0100
commit03a6547b8cea55c8917214a363cadda5b7cffd31 (patch)
tree06aba68ec57d7bd1ba79ef5d543ffa8ec7687591 /src/main.c
parent565f01476b463149bbc04ed6a2f7362f884481d1 (diff)
Open files in binary mode
Now that cmark supports different line endings, files must be openend in binary mode on Windows. Fixes issue #113.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index f9fa29c..c44ba13 100644
--- a/src/main.c
+++ b/src/main.c
@@ -145,7 +145,7 @@ int main(int argc, char *argv[]) {
parser = cmark_parser_new(options);
for (i = 0; i < numfps; i++) {
- FILE *fp = fopen(argv[files[i]], "r");
+ FILE *fp = fopen(argv[files[i]], "rb");
if (fp == NULL) {
fprintf(stderr, "Error opening file %s: %s\n", argv[files[i]],
strerror(errno));