diff --git a/code/qcommon/common.c b/code/qcommon/common.c index 8512cc0d..aeab6e2e 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -2470,7 +2470,7 @@ void Com_ReadCDKey( const char *filename ) { FS_SV_FOpenFileRead( fbuffer, &f ); if ( !f ) { - Q_strncpyz( cl_cdkey, " ", 17 ); + Com_Memset( cl_cdkey, '\0', 17 ); return; } @@ -2482,7 +2482,7 @@ void Com_ReadCDKey( const char *filename ) { if (CL_CDKeyValidate(buffer, NULL)) { Q_strncpyz( cl_cdkey, buffer, 17 ); } else { - Q_strncpyz( cl_cdkey, " ", 17 ); + Com_Memset( cl_cdkey, '\0', 17 ); } } @@ -2500,7 +2500,7 @@ void Com_AppendCDKey( const char *filename ) { FS_SV_FOpenFileRead( fbuffer, &f ); if (!f) { - Q_strncpyz( &cl_cdkey[16], " ", 17 ); + Com_Memset( &cl_cdkey[16], '\0', 17 ); return; } @@ -2512,7 +2512,7 @@ void Com_AppendCDKey( const char *filename ) { if (CL_CDKeyValidate(buffer, NULL)) { strcat( &cl_cdkey[16], buffer ); } else { - Q_strncpyz( &cl_cdkey[16], " ", 17 ); + Com_Memset( &cl_cdkey[16], '\0', 17 ); } }