return the length of the string excluding the null-termination character on success in GetEnvironmentVariable(). Thanks to Hartmut.
Modified: trunk/reactos/lib/kernel32/misc/env.c
--- trunk/reactos/lib/kernel32/misc/env.c 2005-07-11 18:22:53 UTC (rev 16535) +++ trunk/reactos/lib/kernel32/misc/env.c 2005-07-11 20:30:33 UTC (rev 16536) @@ -91,7 +91,7 @@
/* free unicode variable name string */ RtlFreeUnicodeString (&VarNameU);
- return (VarValueU.Length / sizeof(WCHAR) + 1);
+ return (VarValueU.Length / sizeof(WCHAR));
} @@ -133,7 +133,7 @@
} }
- return (VarValue.Length / sizeof(WCHAR) + 1);
+ return (VarValue.Length / sizeof(WCHAR));
}