[winpr,clipboard] fix wrong return check

This commit is contained in:
akallabeth 2023-03-14 10:58:15 +01:00 committed by akallabeth
parent 7fe70c5685
commit 69b4898b73
1 changed files with 1 additions and 1 deletions

View File

@ -1146,7 +1146,7 @@ UINT synthetic_file_read_close(struct synthetic_file* file, BOOL force)
if ((file->offset < 0) || ((UINT64)file->offset >= size) || force)
{
WLog_VRB(TAG, "close file %d", file->fd);
if (CloseHandle(file->fd) < 0)
if (!CloseHandle(file->fd))
{
WLog_WARN(TAG, "failed to close fd %d: %" PRIu32, file->fd, GetLastError());
}