Thomas Faber : advapi32/tests: Do not assume the test is called with an absolute path.

Alexandre Julliard julliard at winehq.org
Wed Nov 16 12:46:45 CST 2011


Module: wine
Branch: master
Commit: c432514b3997ce48d6bccb92c6eb986fcf8f28dd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c432514b3997ce48d6bccb92c6eb986fcf8f28dd

Author: Thomas Faber <thfabba at gmx.de>
Date:   Tue Nov 15 23:37:17 2011 +0100

advapi32/tests: Do not assume the test is called with an absolute path.

---

 dlls/advapi32/tests/service.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c
index 9aa249c..c5dea2f 100644
--- a/dlls/advapi32/tests/service.c
+++ b/dlls/advapi32/tests/service.c
@@ -33,7 +33,7 @@
 #include "wine/test.h"
 
 static const CHAR spooler[] = "Spooler"; /* Should be available on all platforms */
-static const CHAR* selfname;
+static CHAR selfname[MAX_PATH];
 
 static BOOL (WINAPI *pChangeServiceConfig2A)(SC_HANDLE,DWORD,LPVOID);
 static BOOL (WINAPI *pEnumServicesStatusExA)(SC_HANDLE, SC_ENUM_TYPE, DWORD,
@@ -2315,7 +2315,7 @@ START_TEST(service)
     char** myARGV;
 
     myARGC = winetest_get_mainargs(&myARGV);
-    selfname = myARGV[0];
+    GetFullPathNameA(myARGV[0], sizeof(selfname), selfname, NULL);
     if (myARGC >= 3)
     {
         if (strcmp(myARGV[2], "sleep") == 0)




More information about the wine-cvs mailing list