summaryrefslogtreecommitdiff
path: root/PC/bdist_wininst
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-09-09 03:20:39 -0600
committerSteve Dower <steve.dower@python.org>2019-09-09 02:20:38 -0700
commita6563650c835d50f7302971a5b145e94f9d0dc68 (patch)
tree9633cf07c93d183f095a39314b55e59d26b68bcd /PC/bdist_wininst
parent7669cb8b21c7c9cef758609c44017c09d1ce4658 (diff)
downloadcpython-git-a6563650c835d50f7302971a5b145e94f9d0dc68.tar.gz
bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-14462)
If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
Diffstat (limited to 'PC/bdist_wininst')
-rw-r--r--PC/bdist_wininst/install.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c
index 0219a195bc..5d77542582 100644
--- a/PC/bdist_wininst/install.c
+++ b/PC/bdist_wininst/install.c
@@ -938,7 +938,8 @@ static BOOL SystemError(int error, char *msg)
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM,
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),