diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2016-03-26 12:20:28 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2016-03-26 12:20:28 +0100 |
commit | 03a6547b8cea55c8917214a363cadda5b7cffd31 (patch) | |
tree | 06aba68ec57d7bd1ba79ef5d543ffa8ec7687591 /src/cmark.h | |
parent | 565f01476b463149bbc04ed6a2f7362f884481d1 (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/cmark.h')
-rw-r--r-- | src/cmark.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmark.h b/src/cmark.h index 31bbf01..3c5d6b6 100644 --- a/src/cmark.h +++ b/src/cmark.h @@ -418,7 +418,7 @@ CMARK_EXPORT void cmark_consolidate_text_nodes(cmark_node *root); * Streaming interface: * * cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT); - * FILE *fp = fopen("myfile.md", "r"); + * FILE *fp = fopen("myfile.md", "rb"); * while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) { * cmark_parser_feed(parser, buffer, bytes); * if (bytes < sizeof(buffer)) { |