From: Vibhav Pant vibhavp@gmail.com
--- dlls/bluetoothapis/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/bluetoothapis/main.c b/dlls/bluetoothapis/main.c index f3e99c5fd2b..a93b0ccf87e 100644 --- a/dlls/bluetoothapis/main.c +++ b/dlls/bluetoothapis/main.c @@ -1150,7 +1150,11 @@ DWORD WINAPI BluetoothAuthenticateDeviceEx( HWND parent, HANDLE handle_radio, BL { ret = GetLastError(); if (ret == ERROR_IO_PENDING) - ret = GetOverlappedResult( handle_radio, &ovl, &bytes, TRUE ); + { + ret = ERROR_SUCCESS; + if (!GetOverlappedResult( handle_radio, &ovl, &bytes, TRUE )) + ret = GetLastError(); + } } CloseHandle( ovl.hEvent );