Skip to content

Commit 00e1415

Browse files
committed
fix off-by-one error while preparing input fd-set
fixes #27
1 parent 141f256 commit 00e1415

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/flutter-pi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,11 +1519,11 @@ void *io_loop(void *userdata) {
15191519

15201520
for (int i = 0; i < n_input_devices; i++) {
15211521
FD_SET(input_devices[i].fd, &fds);
1522-
if (input_devices[i].fd +1 > nfds) nfds = input_devices[i].fd;
1522+
if (input_devices[i].fd + 1 > nfds) nfds = input_devices[i].fd + 1;
15231523
}
15241524

15251525
FD_SET(drm.fd, &fds);
1526-
if (drm.fd +1 > nfds) nfds = drm.fd;
1526+
if (drm.fd + 1 > nfds) nfds = drm.fd + 1;
15271527

15281528
const fd_set const_fds = fds;
15291529

0 commit comments

Comments
 (0)