29 Oct
2025
29 Oct
'25
6 a.m.
Dmitry Timoshkov (@dmitry) commented about dlls/kernelbase/sync.c:
*/ DWORD WINAPI DECLSPEC_HOTPATCH WaitForSingleObjectEx( HANDLE handle, DWORD timeout, BOOL alertable ) { - return WaitForMultipleObjectsEx( 1, &handle, FALSE, timeout, alertable ); + NTSTATUS status; + LARGE_INTEGER time; + + status = NtWaitForSingleObject( normalize_std_handle( handle ), alertable, + get_nt_timeout( &time, timeout ) ); + if (HIWORD(status)) /* is it an error code? */ Shouldn't the check use something like NT_SUCCESS()/NT_ERROR() macros instead of HIWORD()?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9305#note_119960