FD_ISSET.
Fixes: debbugs:12668
+2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsterm.m (ns_select): Check writefds before call to
+ FD_ISSET (Bug#12668).
+
2012-10-18 Daniel Colascione <dancol@dancol.org>
* alloc.c (NSTATICS): Increase from 0x650 to 0x1000
/* NSTRACE (ns_select); */
- for (k = 0; readfds && k < nfds+1; k++)
+ for (k = 0; k < nfds+1; k++)
{
- if (FD_ISSET(k, readfds)) ++nr;
- if (FD_ISSET(k, writefds)) ++nr;
+ if (readfds && FD_ISSET(k, readfds)) ++nr;
+ if (writefds && FD_ISSET(k, writefds)) ++nr;
}
if (NSApp == nil