Marcus Meissner : kernel32: Fixed size to GetEnvironmentVariableW.

Alexandre Julliard julliard at winehq.org
Fri Dec 17 11:30:46 CST 2010


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

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Thu Dec 16 23:16:24 2010 +0100

kernel32: Fixed size to GetEnvironmentVariableW.

---

 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 e29e1b2..64c459a 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)
         {




More information about the wine-cvs mailing list