Commit 9f1b8197 authored by Alexandre Julliard's avatar Alexandre Julliard

Don't get system directory from the environment, use

GetSystemDirectory instead.
parent 99a6efa1
...@@ -32,14 +32,12 @@ ...@@ -32,14 +32,12 @@
*/ */
LPSTR WINAPI GetWin32sDirectory(void) LPSTR WINAPI GetWin32sDirectory(void)
{ {
static char sysdir[0x80]; static const char win32s[] = "\\win32s";
LPSTR text;
GetEnvironmentVariableA("winsysdir", sysdir, 0x80); int len = GetSystemDirectoryA( NULL, 0 );
if (!sysdir) return NULL; LPSTR text = HeapAlloc( GetProcessHeap(), 0, len + sizeof(win32s) - 1 );
strcat(sysdir, "\\WIN32S"); GetSystemDirectoryA( text, len );
text = HeapAlloc(GetProcessHeap(), 0, strlen(sysdir)+1); strcat( text, win32s );
strcpy(text, sysdir);
return text; return text;
} }
...@@ -60,4 +58,3 @@ HTASK16 WINAPI GetCurrentTask32(void) ...@@ -60,4 +58,3 @@ HTASK16 WINAPI GetCurrentTask32(void)
{ {
return NtCurrentTeb()->htask16; return NtCurrentTeb()->htask16;
} }
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