diff options
author | Zackery Spytz <zspytz@gmail.com> | 2019-09-11 09:39:34 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@python.org> | 2019-09-11 09:39:34 (GMT) |
commit | 289c5ea7737e44e3b150532b3498e3d3d4c70d99 (patch) | |
tree | 5a4a64123fa06f5b2f7b0e1ae6ad548a95a74e8b /PC | |
parent | 58d61efd4cdece3b026868a66d829001198d29b1 (diff) | |
download | cpython-289c5ea7737e44e3b150532b3498e3d3d4c70d99.zip cpython-289c5ea7737e44e3b150532b3498e3d3d4c70d99.tar.gz cpython-289c5ea7737e44e3b150532b3498e3d3d4c70d99.tar.bz2 |
bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-15822)
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 a656365)
Diffstat (limited to 'PC')
-rw-r--r-- | PC/bdist_wininst/install.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c index f1cc7fe..e3b52a8 100644 --- a/PC/bdist_wininst/install.c +++ b/PC/bdist_wininst/install.c @@ -895,7 +895,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), |