Skip to content

Commit

Permalink
Shut up compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
Thilo Schulz committed Jan 21, 2011
1 parent 35c1e98 commit 7471510
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions code/sys/sys_main.c
Expand Up @@ -162,11 +162,16 @@ qboolean Sys_WritePIDFile( void )
char pidBuffer[ 64 ] = { 0 };
int pid;

fread( pidBuffer, sizeof( char ), sizeof( pidBuffer ) - 1, f );
pid = fread( pidBuffer, sizeof( char ), sizeof( pidBuffer ) - 1, f );
fclose( f );

pid = atoi( pidBuffer );
if( !Sys_PIDIsRunning( pid ) )
if(pid > 0)
{
pid = atoi( pidBuffer );
if( !Sys_PIDIsRunning( pid ) )
stale = qtrue;
}
else
stale = qtrue;
}

Expand Down

0 comments on commit 7471510

Please sign in to comment.