Fix being unable to enter Team Arena CD key

The CD key defaulted to spaces. Q3 UI uses text overwrite mode by
default so typing the CD key writes over the spaces. Team Arena UI
uses text insert mode by default so to enter the CD key the user
had to delete the spaces or toggling overwrite mode by pressing
the insert key.

Now the CD key defaults to empty so in Team Arena you can just type
it in.
This commit is contained in:
Zack Middleton 2021-10-23 08:23:18 -04:00
parent f734a2da9a
commit 1c8b1122c5
1 changed files with 4 additions and 4 deletions

View File

@ -2470,7 +2470,7 @@ void Com_ReadCDKey( const char *filename ) {
FS_SV_FOpenFileRead( fbuffer, &f ); FS_SV_FOpenFileRead( fbuffer, &f );
if ( !f ) { if ( !f ) {
Q_strncpyz( cl_cdkey, " ", 17 ); Com_Memset( cl_cdkey, '\0', 17 );
return; return;
} }
@ -2482,7 +2482,7 @@ void Com_ReadCDKey( const char *filename ) {
if (CL_CDKeyValidate(buffer, NULL)) { if (CL_CDKeyValidate(buffer, NULL)) {
Q_strncpyz( cl_cdkey, buffer, 17 ); Q_strncpyz( cl_cdkey, buffer, 17 );
} else { } 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 ); FS_SV_FOpenFileRead( fbuffer, &f );
if (!f) { if (!f) {
Q_strncpyz( &cl_cdkey[16], " ", 17 ); Com_Memset( &cl_cdkey[16], '\0', 17 );
return; return;
} }
@ -2512,7 +2512,7 @@ void Com_AppendCDKey( const char *filename ) {
if (CL_CDKeyValidate(buffer, NULL)) { if (CL_CDKeyValidate(buffer, NULL)) {
strcat( &cl_cdkey[16], buffer ); strcat( &cl_cdkey[16], buffer );
} else { } else {
Q_strncpyz( &cl_cdkey[16], " ", 17 ); Com_Memset( &cl_cdkey[16], '\0', 17 );
} }
} }