diff options
Diffstat (limited to 'source/sv_main.c')
-rw-r--r-- | source/sv_main.c | 6 |
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; } } } |