Skip to content

Commit 188d175

Browse files
hax0kartikfincs
authored andcommitted
Fix select()
1 parent 309c3f1 commit 188d175

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

libctru/source/services/soc/soc_select.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,21 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc
5959
|| (exceptfds && FD_ISSET(i, exceptfds))) {
6060

6161
if(readfds && FD_ISSET(i, readfds)) {
62-
if(pollinfo[j].events & (POLLIN|POLLHUP))
62+
if(pollinfo[j].revents & (POLLIN|POLLHUP))
6363
found = 1;
6464
else
6565
FD_CLR(i, readfds);
6666
}
6767

6868
if(writefds && FD_ISSET(i, writefds)) {
69-
if(pollinfo[j].events & (POLLOUT|POLLHUP))
69+
if(pollinfo[j].revents & (POLLOUT|POLLHUP))
7070
found = 1;
7171
else
7272
FD_CLR(i, writefds);
7373
}
7474

7575
if(exceptfds && FD_ISSET(i, exceptfds)) {
76-
if(pollinfo[j].events & POLLERR)
76+
if(pollinfo[j].revents & POLLERR)
7777
found = 1;
7878
else
7979
FD_CLR(i, exceptfds);

0 commit comments

Comments
 (0)