ref: 863afa816738407f639618fb43659b97dcc3430d
parent: 0ff67f43d6d13d9675e305abc652188ea95a88fe
author: Simon Howard <[email protected]>
date: Sat Dec 4 15:34:39 EST 2010
Fix bug when running with -server option. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2190
--- a/src/net_loop.c
+++ b/src/net_loop.c
@@ -137,9 +137,16 @@
static net_addr_t *NET_CL_ResolveAddress(char *address)
{
- client_addr.module = &net_loop_client_module;
+ if (address == NULL)
+ {
+ client_addr.module = &net_loop_client_module;
- return &client_addr;
+ return &client_addr;
+ }
+ else
+ {
+ return NULL;
+ }
}
net_module_t net_loop_client_module =
@@ -206,8 +213,15 @@
static net_addr_t *NET_SV_ResolveAddress(char *address)
{
- server_addr.module = &net_loop_server_module;
- return &server_addr;
+ if (address == NULL)
+ {
+ server_addr.module = &net_loop_server_module;
+ return &server_addr;
+ }
+ else
+ {
+ return NULL;
+ }
}
net_module_t net_loop_server_module =