From c02dc8b2c921d19b61d7f930850ea0ce2b5d2709 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 30 May 2015 00:38:44 +0300 Subject: [PATCH] tools/make-frozen.py: Open files in binary mode. --- tools/make-frozen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/make-frozen.py b/tools/make-frozen.py index c3dfe591c9..f12e6f6db3 100755 --- a/tools/make-frozen.py +++ b/tools/make-frozen.py @@ -49,8 +49,8 @@ print("const char mp_frozen_content[] = {") for f, st in modules: m = module_name(f) print('"%s\\0"' % m) - data = open(sys.argv[1] + "/" + f).read() - data = repr(data)[1:-1] + data = open(sys.argv[1] + "/" + f, "rb").read() + data = repr(data)[2:-1] data = data.replace('"', '\\"') print('"%s"' % data) print("};")