ntdll: Do not override existing context's EAX when dispatching user APC.

Fixes a regression introduced by 175a3649ba,
which caused Winamp's in_wave module to crash when playing a wav file
(the previous behavior only changed EAX when there was no context).

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2021-01-08 19:29:42 +02:00 committed by Alexandre Julliard
parent f72f1ff952
commit 775dac0238
1 changed files with 1 additions and 1 deletions

View File

@ -1696,6 +1696,7 @@ struct apc_stack_layout * WINAPI setup_user_apc_dispatcher_stack( CONTEXT *conte
{
c.ContextFlags = CONTEXT_FULL;
NtGetContextThread( GetCurrentThread(), &c );
c.Eax = STATUS_USER_APC;
context = &c;
}
memmove( &stack->context, context, sizeof(stack->context) );
@ -1704,7 +1705,6 @@ struct apc_stack_layout * WINAPI setup_user_apc_dispatcher_stack( CONTEXT *conte
stack->arg1 = arg1;
stack->arg2 = arg2;
stack->func = func;
stack->context.Eax = STATUS_USER_APC;
return stack;
}