Skip to content
Snippets Groups Projects
Commit e444c3b3 authored by deuce's avatar deuce
Browse files

Fix single-array socket_select broken in previous commit.

This should fix the crash in ircd.
parent f48f286e
No related branches found
No related tags found
No related merge requests found
......@@ -3723,7 +3723,7 @@ js_socket_select(JSContext *cx, uintN argc, jsval *arglist)
sets[0]=&socket_set[0];
for(i=0;i<limit[0];i++) {
if(!JS_GetElement(cx, inarray[i], i, &val))
if(!JS_GetElement(cx, inarray[0], i, &val))
break;
sock=js_socket_add(cx,val,&socket_set[0]);
if(sock!=INVALID_SOCKET) {
......@@ -3735,7 +3735,7 @@ js_socket_select(JSContext *cx, uintN argc, jsval *arglist)
rc=JS_SUSPENDREQUEST(cx);
if(select(maxsock+1,sets[0],sets[1],sets[2],&tv) >= 0) {
for(i=0;i<limit[0];i++) {
if(!JS_GetElement(cx, inarray[i], i, &val))
if(!JS_GetElement(cx, inarray[0], i, &val))
break;
if(js_socket_isset(cx,val,&socket_set[0])) {
val=INT_TO_JSVAL(i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment