From 70b037145e5087f19d2a29f4f60085609bc8cc08 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andre=CC=81=20Moreau?= Date: Fri, 18 Sep 2015 11:38:27 -0400 Subject: [PATCH] libwinpr-synch: fix broken FD_ISSET check caused by hidden type cast from int to char --- winpr/libwinpr/synch/wait.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winpr/libwinpr/synch/wait.c b/winpr/libwinpr/synch/wait.c index 7891e85..3192b43 100644 --- a/winpr/libwinpr/synch/wait.c +++ b/winpr/libwinpr/synch/wait.c @@ -479,9 +479,9 @@ DWORD WaitForMultipleObjects(DWORD nCount, const HANDLE *lpHandles, BOOL bWaitAl signal_set = pollfds[index].revents & pollfds[index].events; #else if (Object->Mode & WINPR_FD_READ) - signal_set = FD_ISSET(fd, &rfds); + signal_set = FD_ISSET(fd, &rfds) ? 1 : 0; if (Object->Mode & WINPR_FD_WRITE) - signal_set = FD_ISSET(fd, &wfds); + signal_set |= FD_ISSET(fd, &wfds) ? 1 : 0; #endif if (signal_set) { -- 2.7.4