From 1c8b1122c52569cfdfb52eee9a87fe396cfdb957 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 23 Oct 2021 08:23:18 -0400 Subject: [PATCH] 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. --- code/qcommon/common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ); } }