From 04c0f66ca983e80acc0c330246208e32e3fc35ea Mon Sep 17 00:00:00 2001 From: fufesou <13586388+fufesou@users.noreply.github.com> Date: Tue, 3 Sep 2024 21:15:35 +0800 Subject: [PATCH] fix: set to OK if recv flag is TRUE (#9244) Signed-off-by: fufesou --- libs/clipboard/src/windows/wf_cliprdr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/clipboard/src/windows/wf_cliprdr.c b/libs/clipboard/src/windows/wf_cliprdr.c index 5bca54052..1f65b1913 100644 --- a/libs/clipboard/src/windows/wf_cliprdr.c +++ b/libs/clipboard/src/windows/wf_cliprdr.c @@ -1462,6 +1462,8 @@ UINT wait_response_event(UINT32 connID, wfClipboard *clipboard, HANDLE event, BO // The data has been received, but the event is still not signaled. // We just skip the rest of the waiting and reset the flag. *recvedFlag = FALSE; + // Explicitly set the waitRes to WAIT_OBJECT_0, because we have received the data. + waitRes = WAIT_OBJECT_0; } else { // The data has not been received yet, we should continue to wait. continue;