summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/cl_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/cl_main.c b/src/client/cl_main.c
index 6d4d132c..0bfc16c9 100644
--- a/src/client/cl_main.c
+++ b/src/client/cl_main.c
@@ -667,7 +667,7 @@ void CL_StopRecord_f( void ) {
CL_DemoFilename
==================
*/
-void CL_DemoFilename( int number, char *fileName ) {
+void CL_DemoFilename( int number, char *fileName, int fileNameSize ) {
int a,b,c,d;
if(number < 0 || number > 9999)
@@ -681,7 +681,7 @@ void CL_DemoFilename( int number, char *fileName ) {
number -= c*10;
d = number;
- Com_sprintf( fileName, MAX_OSPATH, "demo%i%i%i%i"
+ Com_sprintf( fileName, fileNameSize, "demo%i%i%i%i"
, a, b, c, d );
}
@@ -736,7 +736,7 @@ void CL_Record_f( void ) {
// scan for a free demo name
for ( number = 0 ; number <= 9999 ; number++ ) {
- CL_DemoFilename( number, demoName );
+ CL_DemoFilename( number, demoName, sizeof( demoName ) );
Com_sprintf (name, sizeof(name), "demos/%s.%s%d", demoName, DEMOEXT, PROTOCOL_VERSION );
if (!FS_FileExists(name))