diff -r 2e836bebb518 -r 453917e94e55 project_files/frontlib/socket.c --- a/project_files/frontlib/socket.c Wed Nov 14 00:23:29 2012 +0100 +++ b/project_files/frontlib/socket.c Thu Nov 22 00:41:53 2012 +0100 @@ -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); } }