From 7471510c8e598ece5163cd65f2360312c6048d73 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Fri, 21 Jan 2011 20:47:32 +0000 Subject: [PATCH] Shut up compiler error --- code/sys/sys_main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/code/sys/sys_main.c b/code/sys/sys_main.c index 91c54f12..1030bcb9 100644 --- a/code/sys/sys_main.c +++ b/code/sys/sys_main.c @@ -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; }