Repository: lucy-charmonizer Updated Branches: refs/heads/master 9cf02f2a2 -> bd9f6b531
Read files in binary mode Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/bd9f6b53 Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/bd9f6b53 Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/bd9f6b53 Branch: refs/heads/master Commit: bd9f6b5311503993fc08ba2b70768646b1cad7d0 Parents: 9cf02f2 Author: Nick Wellnhofer <[email protected]> Authored: Sun May 22 17:02:43 2016 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Sun May 22 17:04:29 2016 +0200 ---------------------------------------------------------------------- src/Charmonizer/Core/Util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/bd9f6b53/src/Charmonizer/Core/Util.c ---------------------------------------------------------------------- diff --git a/src/Charmonizer/Core/Util.c b/src/Charmonizer/Core/Util.c index 0d0cc47..9b490f5 100644 --- a/src/Charmonizer/Core/Util.c +++ b/src/Charmonizer/Core/Util.c @@ -47,7 +47,7 @@ chaz_Util_write_file(const char *filename, const char *content) { char* chaz_Util_slurp_file(const char *file_path, size_t *len_ptr) { - FILE *const file = fopen(file_path, "r"); + FILE *const file = fopen(file_path, "rb"); char *contents; size_t len; long check_val; @@ -220,7 +220,7 @@ chaz_Util_can_open_file(const char *file_path) { FILE *garbage_fh; /* Use fopen as a portable test for the existence of a file. */ - garbage_fh = fopen(file_path, "r"); + garbage_fh = fopen(file_path, "rb"); if (garbage_fh == NULL) { return 0; }
