1
0
forked from aniani/vim

patch 9.1.0780: MS-Windows: incorrect Win32 error checking

Problem:  MS-Windows: incorrect Win32 error checking
Solution: fix wrong order of error handling and perform
          some minor refactoring (Nir Lichtman)

In the function that adjusts the process privileges there is a mistake
in which GetLastError is called after CloseHandle, though clearly the
last error check is meant for the privileges related call before hand
and the current state appears like a mistake.

So fix this problem, and also perform the following:

- Remove the static variable done since the PlatformId is only called
  during initialization
- Fix incorrect parameter passed to the Win32 API privileges function

closes: #15845

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Nir Lichtman
2024-10-13 19:44:07 +02:00
committed by Christian Brabandt
parent a2aa921f76
commit b516598092
2 changed files with 20 additions and 16 deletions

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
780,
/**/
779,
/**/