Fix corruption of font files on Windows.
authorCarl Hetherington <cth@carlh.net>
Tue, 18 Aug 2015 12:32:03 +0000 (13:32 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 18 Aug 2015 12:32:03 +0000 (13:32 +0100)
src/interop_subtitle_asset.cc

index 620fed7362d6d1bc206d20326d7de8ab27219506..fbdd839b81218b2876ef6568a603c8b2583d7796 100644 (file)
@@ -159,7 +159,7 @@ InteropSubtitleAsset::write (boost::filesystem::path p) const
 
        BOOST_FOREACH (shared_ptr<InteropLoadFontNode> i, _load_font_nodes) {
                boost::filesystem::path file = p.parent_path() / i->uri;
-               FILE* f = fopen_boost (file, "w");
+               FILE* f = fopen_boost (file, "wb");
                if (!f) {
                        throw FileError ("could not open font file for writing", file, errno);
                }