summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2010-12-14 20:55:30 +0000
committerSimon Howard2010-12-14 20:55:30 +0000
commit1ef81eb5f7c336972fe56f15285f389cafdc96f5 (patch)
tree539f6cad7d487509c57ffd79bd2659c540991b1c /src
parentf4eb88dd2322db7831563ad55f8b6c45516906f9 (diff)
downloadchocolate-doom-1ef81eb5f7c336972fe56f15285f389cafdc96f5.tar.gz
chocolate-doom-1ef81eb5f7c336972fe56f15285f389cafdc96f5.tar.bz2
chocolate-doom-1ef81eb5f7c336972fe56f15285f389cafdc96f5.zip
Check that an address is provided to the -query command line option
(thanks Sander van Dijk). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2221
Diffstat (limited to 'src')
-rw-r--r--src/d_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/d_main.c b/src/d_main.c
index 032c5caa..36382fb6 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -868,7 +868,7 @@ void D_DoomMain (void)
p = M_CheckParm("-query");
- if (p > 0)
+ if (p && p < myargc-1)
{
NET_QueryAddress(myargv[p+1]);
exit(0);