Skip to content

Commit 5883936

Browse files
kk1201timangus
authored andcommitted
Read and write CD key in lowercase
1 parent 67e4fa9 commit 5883936

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

code/qcommon/common.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,6 +2485,8 @@ void Com_ReadCDKey( const char *filename ) {
24852485
FS_Read( buffer, 16, f );
24862486
FS_FCloseFile( f );
24872487

2488+
Q_strlwr(buffer);
2489+
24882490
if (CL_CDKeyValidate(buffer, NULL)) {
24892491
Q_strncpyz( cl_cdkey, buffer, 17 );
24902492
} else {
@@ -2555,6 +2557,8 @@ static void Com_WriteCDKey( const char *filename, const char *ikey ) {
25552557
goto out;
25562558
}
25572559

2560+
Q_strlwr(key);
2561+
25582562
FS_Write( key, 16, f );
25592563

25602564
FS_Printf( f, "\n// generated by " PRODUCT_NAME ", do not modify\r\n" );

0 commit comments

Comments
 (0)