[PATCH 26/26] kernel32: Fixed size to GetEnvironmentVariableW

Marcus Meissner marcus at jet.franken.de
Thu Dec 16 16:16:24 CST 2010


Hi,

Is in character not bytes.

Ciao, Marcus
---
 dlls/kernel32/process.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index a071c82..098423f 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -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)
         {
-- 
1.7.1



More information about the wine-patches mailing list