Commit 2f2cdc8b authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

ntdll: Don't fail when trying to remove the value of a non-existant variable in…

ntdll: Don't fail when trying to remove the value of a non-existant variable in RtlSetEnvironmentVariable(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51035Signed-off-by: 's avatarGijs Vermeulen <gijsvrm@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 09879590
......@@ -276,7 +276,7 @@ NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR* penv, PUNICODE_STRING name,
{
INT varlen, len, old_size;
LPWSTR p, env;
NTSTATUS nts = STATUS_VARIABLE_NOT_FOUND;
NTSTATUS nts = STATUS_SUCCESS;
TRACE("(%p, %s, %s)\n", penv, debugstr_us(name), debugstr_us(value));
......@@ -352,7 +352,6 @@ NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR* penv, PUNICODE_STRING name,
memcpy( p, value->Buffer, value->Length );
p[value->Length / sizeof(WCHAR)] = 0;
}
nts = STATUS_SUCCESS;
done:
if (!penv) RtlReleasePebLock();
......
......@@ -621,7 +621,7 @@ static void test_RtlSetEnvironmentVariable(void)
query_env_var(env, L"cat", NULL);
status = set_env_var(&env, L"cat", NULL);
todo_wine ok(!status, "got %#x\n", status);
ok(!status, "got %#x\n", status);
status = set_env_var(&env, L"foo", L"meouw");
ok(!status, "got %#x\n", status);
......@@ -632,7 +632,7 @@ static void test_RtlSetEnvironmentVariable(void)
query_env_var(env, L"foo", NULL);
status = set_env_var(&env, L"horse", NULL);
todo_wine ok(!status, "got %#x\n", status);
ok(!status, "got %#x\n", status);
query_env_var(env, L"horse", NULL);
status = set_env_var(&env, L"me=too", L"also");
......
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