author | unc0rr |
Thu, 22 Nov 2012 00:56:36 +0400 | |
changeset 8091 | e0a76056a633 |
parent 8090 | 38d9cc60b14c |
child 8092 | 08960209db8c |
child 8093 | 2286a39140da |
--- a/project_files/frontlib/socket.c Wed Nov 21 18:34:45 2012 +0100 +++ b/project_files/frontlib/socket.c Thu Nov 22 00:56:36 2012 +0400 @@ -84,7 +84,7 @@ srand(time(NULL)); for(int i=0; !result->sock && i<1000; i++) { // IANA suggests using ports in the range 49152-65535 for things like this - result->port = 49152+(rand()%(65535-49152)); + result->port = 49152+(rand()%(65536-49152)); result->sock = listen(result->port); } }