return the length of the string excluding the null-termination character on success in GetEnvironmentVariable(). Thanks to Hartmut.

svn path=/trunk/; revision=16536
This commit is contained in:
Thomas Bluemel 2005-07-11 20:30:33 +00:00
parent 9b991b83fd
commit fcc95c66a8

View file

@ -91,7 +91,7 @@ GetEnvironmentVariableA (
/* free unicode variable name string */
RtlFreeUnicodeString (&VarNameU);
return (VarValueU.Length / sizeof(WCHAR) + 1);
return (VarValueU.Length / sizeof(WCHAR));
}
@ -133,7 +133,7 @@ GetEnvironmentVariableW (
}
}
return (VarValue.Length / sizeof(WCHAR) + 1);
return (VarValue.Length / sizeof(WCHAR));
}