[PATCH] crypt32/tests: Use GetWindowsDirectoryA instead of GetEnvironmentVariableA to avoid a test failure.
Sven Baars
sven.wine at gmail.com
Fri Nov 8 15:54:51 CST 2019
Signed-off-by: Sven Baars <sven.wine at gmail.com>
---
dlls/crypt32/tests/sip.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/crypt32/tests/sip.c b/dlls/crypt32/tests/sip.c
index d8d6a87445..f0849219f5 100644
--- a/dlls/crypt32/tests/sip.c
+++ b/dlls/crypt32/tests/sip.c
@@ -145,8 +145,6 @@ static void test_SIPRetrieveSubjectGUID(void)
BOOL ret;
GUID subject;
HANDLE file;
- static const CHAR windir[] = "windir";
- static const CHAR regeditExe[] = "regedit.exe";
static const GUID nullSubject = { 0x0, 0x0, 0x0, { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 }};
static const WCHAR deadbeef[] = { 'c',':','\\','d','e','a','d','b','e','e','f','.','d','b','f',0 };
/* Couldn't find a name for this GUID, it's the one used for 95% of the files */
@@ -183,10 +181,9 @@ static void test_SIPRetrieveSubjectGUID(void)
*
* Use A-functions where possible as that should be available on all platforms
*/
- ret = GetEnvironmentVariableA(windir, regeditPath, MAX_PATH);
- ok (ret > 0, "expected GEVA(windir) to succeed, last error %d\n", GetLastError());
- strcat(regeditPath, "\\");
- strcat(regeditPath, regeditExe);
+ ret = GetWindowsDirectoryA(regeditPath, MAX_PATH-12);
+ ok (ret > 0, "Expected GetWindowsDirectoryA to succeed, last error %d\n", GetLastError());
+ strcat(regeditPath, "\\regedit.exe");
MultiByteToWideChar(CP_ACP, 0, regeditPath, strlen(regeditPath)+1, regeditPathW,
ARRAY_SIZE(regeditPathW));
--
2.17.1
More information about the wine-devel
mailing list