userenv: Use strncmpiW instead of memicmpW for strings without embedded nulls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1dd25f2dea
commit
3c53e06b7b
|
@ -111,15 +111,13 @@ static void set_registry_variables(WCHAR **env, HKEY hkey, DWORD type, BOOL set_
|
||||||
if (ret != ERROR_SUCCESS)
|
if (ret != ERROR_SUCCESS)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (!memicmpW(name, SystemRootW, ARRAY_SIZE(SystemRootW)))
|
if (!strcmpiW(name, SystemRootW)) continue;
|
||||||
continue;
|
if (!strcmpiW(name, SystemDriveW)) continue;
|
||||||
if (!memicmpW(name, SystemDriveW, ARRAY_SIZE(SystemDriveW)))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
RtlInitUnicodeString(&us_name, name);
|
RtlInitUnicodeString(&us_name, name);
|
||||||
us_value.Buffer = value;
|
us_value.Buffer = value;
|
||||||
us_value.MaximumLength = sizeof(value);
|
us_value.MaximumLength = sizeof(value);
|
||||||
if (!memicmpW(name, PATHW, ARRAY_SIZE(PATHW)) &&
|
if (!strncmpiW(name, PATHW, ARRAY_SIZE(PATHW)) &&
|
||||||
!RtlQueryEnvironmentVariable_U(*env, &us_name, &us_value))
|
!RtlQueryEnvironmentVariable_U(*env, &us_name, &us_value))
|
||||||
{
|
{
|
||||||
if (!set_path)
|
if (!set_path)
|
||||||
|
|
Loading…
Reference in New Issue