Signed-off-by: Alistair Francis <alistair.fran...@xilinx.com> Acked-by: Edgar E. Iglesias <edgar.igles...@xilinx.com> ---
util/oslib-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/oslib-win32.c b/util/oslib-win32.c index 7ec0f8e083..a015e1ac96 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -438,7 +438,7 @@ static int poll_rest(gboolean poll_msgs, HANDLE *handles, gint nhandles, if (timeout == 0 && nhandles > 1) { /* Remove the handle that fired */ int i; - if (ready < nhandles - 1) { + if ((ready - WAIT_OBJECT_0) < nhandles - 1) { for (i = ready - WAIT_OBJECT_0 + 1; i < nhandles; i++) { handles[i-1] = handles[i]; } -- 2.11.0