From 3afbcc9854cf25db300dbe73b3033c824d6a8bb4 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Sun, 30 Jul 2006 14:42:15 +0000 Subject: [PATCH] Changed the demofile slot finder to use FS_FileExists instead of FS_ReadFile to find a free filename. --- code/client/cl_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/client/cl_main.c b/code/client/cl_main.c index 3fc24be1..4c802a7a 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -298,10 +298,8 @@ void CL_Record_f( void ) { CL_DemoFilename( number, demoName ); Com_sprintf (name, sizeof(name), "demos/%s.dm_%d", demoName, PROTOCOL_VERSION ); - len = FS_ReadFile( name, NULL ); - if ( len <= 0 ) { + if (!FS_FileExists(name)) break; // file doesn't exist - } } }