Commit 3c53e06b authored by Alexandre Julliard's avatar Alexandre Julliard

userenv: Use strncmpiW instead of memicmpW for strings without embedded nulls.

parent 1dd25f2d
......@@ -111,15 +111,13 @@ static void set_registry_variables(WCHAR **env, HKEY hkey, DWORD type, BOOL set_
if (ret != ERROR_SUCCESS)
break;
if (!memicmpW(name, SystemRootW, ARRAY_SIZE(SystemRootW)))
continue;
if (!memicmpW(name, SystemDriveW, ARRAY_SIZE(SystemDriveW)))
continue;
if (!strcmpiW(name, SystemRootW)) continue;
if (!strcmpiW(name, SystemDriveW)) continue;
RtlInitUnicodeString(&us_name, name);
us_value.Buffer = 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))
{
if (!set_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment