summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-04-01 21:02:51 +0900
committerGitHub <noreply@github.com>2019-04-01 21:02:51 +0900
commit8384670615a90418fc52c3881242b7c10d1f2b13 (patch)
tree06a3f4584984a63fba6a62ed26271d56f688a256 /Modules
parenta37f356de19828241bf19129f804369794c72ed3 (diff)
downloadcpython-git-8384670615a90418fc52c3881242b7c10d1f2b13.tar.gz
bpo-20844: open script file with "rb" mode (GH-12616)
(cherry picked from commit 10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1)
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 9011bd1f69..e3683b9417 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -1534,7 +1534,7 @@ pymain_open_filename(_PyMain *pymain)
const _PyCoreConfig *config = &_PyGILState_GetInterpreterStateUnsafe()->core_config;
FILE* fp;
- fp = _Py_wfopen(pymain->filename, L"r");
+ fp = _Py_wfopen(pymain->filename, L"rb");
if (fp == NULL) {
char *cfilename_buffer;
const char *cfilename;