diff options
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r-- | src/game/g_client.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c index d0f9349f..49ae26a9 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -890,9 +890,10 @@ static qboolean G_NonSegModel( const char *filename ) if( len < 0 ) return qfalse; - if( len >= sizeof( text ) - 1 ) + if( len == 0 || len >= sizeof( text ) - 1 ) { - G_Printf( "File %s too long\n", filename ); + trap_FS_FCloseFile( f ); + G_Printf( "File %s is %s\n", filename, len == 0 ? "empty" : "too long" ); return qfalse; } @@ -1676,6 +1677,9 @@ void ClientDisconnect( int clientNum ) tent->s.clientNum = ent->s.clientNum; } + if( ent->client->pers.connection ) + ent->client->pers.connection->clientNum = -1; + G_LogPrintf( "ClientDisconnect: %i [%s] (%s) \"%s\"\n", clientNum, ent->client->pers.ip, ent->client->pers.guid, ent->client->pers.netname ); |