summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-04-01 09:35:20 (GMT)
committerGitHub <noreply@github.com>2019-04-01 09:35:20 (GMT)
commit10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1 (patch)
treeca75a763dce4e28e32ea396acb12665f6cf2cfe5 /Modules
parent62f9588663ebfea1735e9d142ef527395a6c2b95 (diff)
downloadcpython-10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1.zip
cpython-10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1.tar.gz
cpython-10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1.tar.bz2
bpo-20844: open script file with "rb" mode (GH-12616)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 42d2c3c..6a7f735 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -283,7 +283,7 @@ static int
pymain_run_file(_PyCoreConfig *config, PyCompilerFlags *cf)
{
const wchar_t *filename = config->run_filename;
- FILE *fp = _Py_wfopen(filename, L"r");
+ FILE *fp = _Py_wfopen(filename, L"rb");
if (fp == NULL) {
char *cfilename_buffer;
const char *cfilename;