diff --git a/src/api.c b/src/api.c index dce2fe5..10438de 100644 --- a/src/api.c +++ b/src/api.c @@ -105,6 +105,9 @@ int epoll_wait(HANDLE ephnd, ep_port_t* port_info; int result; + if (maxevents <= 0) + return_error(-1, ERROR_INVALID_PARAMETER); + if (init() < 0) return -1;