mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-03-13 12:31:57 +00:00
sdennis101@geocities.com provided a fix for a segfault under uquake in
net_udp.c, applied.
This commit is contained in:
parent
4e5c289a19
commit
176bdca935
1 changed files with 4 additions and 2 deletions
|
@ -99,7 +99,9 @@ int UDP_Init (void)
|
||||||
|
|
||||||
// determine my name & address
|
// determine my name & address
|
||||||
gethostname(buff, MAXHOSTNAMELEN);
|
gethostname(buff, MAXHOSTNAMELEN);
|
||||||
local = gethostbyname(buff);
|
if ((local = gethostbyname(buff)) == NULL)
|
||||||
|
myAddr = INADDR_LOOPBACK;
|
||||||
|
else
|
||||||
myAddr = *(int *)local->h_addr_list[0];
|
myAddr = *(int *)local->h_addr_list[0];
|
||||||
|
|
||||||
// if the quake hostname isn't set, set it to the machine name
|
// if the quake hostname isn't set, set it to the machine name
|
||||||
|
|
Loading…
Reference in a new issue