kernel32: Fixed size to GetEnvironmentVariableW.
authorMarcus Meissner <marcus@jet.franken.de>
Thu, 16 Dec 2010 22:16:24 +0000 (23:16 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 17 Dec 2010 12:26:01 +0000 (13:26 +0100)
dlls/kernel32/process.c

index e29e1b279de151d0fcddd01556d2c6c12048ca99..64c459ac97019a8e7097717dd6ca3ad8a5741e79 100644 (file)
@@ -573,7 +573,7 @@ static void set_wow64_environment(void)
 
     /* set the PROCESSOR_ARCHITECTURE variable */
 
-    if (GetEnvironmentVariableW( arch6432W, arch, sizeof(arch) ))
+    if (GetEnvironmentVariableW( arch6432W, arch, sizeof(arch)/sizeof(WCHAR) ))
     {
         if (is_win64)
         {
@@ -581,7 +581,7 @@ static void set_wow64_environment(void)
             SetEnvironmentVariableW( arch6432W, NULL );
         }
     }
-    else if (GetEnvironmentVariableW( archW, arch, sizeof(arch) ))
+    else if (GetEnvironmentVariableW( archW, arch, sizeof(arch)/sizeof(WCHAR) ))
     {
         if (is_wow64)
         {