summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);