summaryrefslogtreecommitdiff
path: root/source/sv_main.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-05-29 17:24:14 +0000
committerAndrey Nazarov <skuller@skuller.net>2010-05-29 17:24:14 +0000
commit895dd036b727615f6199d158b02f73a32be06757 (patch)
tree2a0e7ae1461a1dd6d87ede7ffc21bcfe6d1dac55 /source/sv_main.c
parentd131e6a0a40c0d44f5bfd031d24627b12c063288 (diff)
Don't allow net_maxmsglen value to be less than 512 bytes (zero is still allowed as a special case).
Diffstat (limited to 'source/sv_main.c')
-rw-r--r--source/sv_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/sv_main.c b/source/sv_main.c
index 888d8e2..cf1efea 100644
--- a/source/sv_main.c
+++ b/source/sv_main.c
@@ -616,12 +616,14 @@ static void SVC_DirectConnect( void ) {
if( *s ) {
maxlength = atoi( s );
if( maxlength < 0 || maxlength > MAX_PACKETLEN_WRITABLE ) {
- SV_OobPrintf( "Invalid maximum packet length.\n" );
- Com_DPrintf( " rejected - bad maxpacketlen.\n" );
+ SV_OobPrintf( "Invalid maximum message length.\n" );
+ Com_DPrintf( " rejected - bad maxmsglen.\n" );
return;
}
if( !maxlength ) {
maxlength = MAX_PACKETLEN_WRITABLE;
+ } else if( maxlength < MIN_PACKETLEN ) {
+ maxlength = MIN_PACKETLEN;
}
}
}