Commit fc6b9399 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32/tests: Don't make assumptions about argv[0] of the main process.

parent 74559aaa
......@@ -237,7 +237,7 @@ static BOOL init(void)
myARGC = winetest_get_mainargs( &myARGV );
if (!GetCurrentDirectoryA(sizeof(base), base)) return FALSE;
strcpy(selfname, myARGV[0]);
GetModuleFileNameA( 0, selfname, sizeof(selfname) );
/* Strip the path of selfname */
if ((p = strrchr(selfname, '\\')) != NULL) exename = p + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment