summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-09-09 09:50:30 (GMT)
committerGitHub <noreply@github.com>2019-09-09 09:50:30 (GMT)
commite103732f5df13a97f610a8b80883895f7a273573 (patch)
tree096e25c0407f7cc42a2d7da9fa5356931adc01a4 /PC
parent6e3809c7ce9fbee11c3a3f89dd7e89829b7581ac (diff)
downloadcpython-e103732f5df13a97f610a8b80883895f7a273573.zip
cpython-e103732f5df13a97f610a8b80883895f7a273573.tar.gz
cpython-e103732f5df13a97f610a8b80883895f7a273573.tar.bz2
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. (cherry picked from commit a6563650c835d50f7302971a5b145e94f9d0dc68) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'PC')
-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 6d01ad5..72d9837 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),