From 13db82c73af330ffbc7a813cd38c5bef36d5b54c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 18 Jun 2015 19:50:19 +0100 Subject: Fix several missing binary specifiers to fopen. --- src/file.cc | 2 +- src/mono_picture_frame.cc | 2 +- src/subtitle_asset.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/file.cc b/src/file.cc index f2915947..2009a036 100644 --- a/src/file.cc +++ b/src/file.cc @@ -35,7 +35,7 @@ File::File (boost::filesystem::path file) { _size = boost::filesystem::file_size (file); _data = new uint8_t[_size]; - FILE* f = dcp::fopen_boost (file, "r"); + FILE* f = dcp::fopen_boost (file, "rb"); DCP_ASSERT (f); fread (_data, 1, _size, f); fclose (f); diff --git a/src/mono_picture_frame.cc b/src/mono_picture_frame.cc index fe35b6a9..7a863463 100644 --- a/src/mono_picture_frame.cc +++ b/src/mono_picture_frame.cc @@ -44,7 +44,7 @@ MonoPictureFrame::MonoPictureFrame (boost::filesystem::path path) { boost::uintmax_t const size = boost::filesystem::file_size (path); _buffer = new ASDCP::JP2K::FrameBuffer (size); - FILE* f = fopen_boost (path, "r"); + FILE* f = fopen_boost (path, "rb"); if (!f) { boost::throw_exception (FileError ("could not open JPEG2000 file", path, errno)); } diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc index d9a87263..92da00bf 100644 --- a/src/subtitle_asset.cc +++ b/src/subtitle_asset.cc @@ -312,7 +312,7 @@ void SubtitleAsset::add_font_data (string id, boost::filesystem::path file) { boost::uintmax_t size = boost::filesystem::file_size (file); - FILE* f = fopen_boost (file, "r"); + FILE* f = fopen_boost (file, "rb"); if (!f) { throw FileError ("could not open font file for reading", file, errno); } -- cgit v1.2.3