From 588393618dbc82e7207c21c6ddecca229944a03a Mon Sep 17 00:00:00 2001 From: kk1201 Date: Thu, 16 Jul 2026 17:11:44 +0100 Subject: [PATCH] Read and write CD key in lowercase --- code/qcommon/common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/qcommon/common.c b/code/qcommon/common.c index afa00901..d97312c4 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -2485,6 +2485,8 @@ void Com_ReadCDKey( const char *filename ) { FS_Read( buffer, 16, f ); FS_FCloseFile( f ); + Q_strlwr(buffer); + if (CL_CDKeyValidate(buffer, NULL)) { Q_strncpyz( cl_cdkey, buffer, 17 ); } else { @@ -2555,6 +2557,8 @@ static void Com_WriteCDKey( const char *filename, const char *ikey ) { goto out; } + Q_strlwr(key); + FS_Write( key, 16, f ); FS_Printf( f, "\n// generated by " PRODUCT_NAME ", do not modify\r\n" );