From 8e7a2abec5f89e70d455b9f54300932bf28f63b9 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 3 Oct 2025 22:05:47 +0500 Subject: [PATCH] scripts: waifulib: compiler_optimizations: always lower case build type --- engine/client/cl_main.c | 7 ++++--- scripts/waifulib/compiler_optimizations.py | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index fc87d357..79c6ff85 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -1995,7 +1995,7 @@ static void CL_ParseStatusMessage( netadr_t from, sizebuf_t *msg ) static void CL_ParseGoldSrcStatusMessage( netadr_t from, sizebuf_t *msg ) { static char s[512+8]; - int p, numcl, maxcl, password, remaining; + int p, numcl, maxcl, password, remaining, bots; string host, map, gamedir, version; connprotocol_t proto; char *replace; @@ -2011,13 +2011,14 @@ static void CL_ParseGoldSrcStatusMessage( netadr_t from, sizebuf_t *msg ) MSG_ReadShort( msg ); // app id numcl = MSG_ReadByte( msg ); maxcl = MSG_ReadByte( msg ); - MSG_ReadByte( msg ); // bots count + bots = MSG_ReadByte( msg ); // bots count MSG_ReadByte( msg ); // dedicated MSG_ReadByte( msg ); // operating system password = MSG_ReadByte( msg ); Q_strncpy( version, MSG_ReadString( msg ), sizeof( version )); - if( maxcl > MAX_CLIENTS || numcl > MAX_CLIENTS ) + // sanity check + if( maxcl > MAX_CLIENTS || numcl > MAX_CLIENTS || bots > MAX_CLIENTS || numcl > maxcl || bots > maxcl ) return; if( MSG_CheckOverflow( msg )) diff --git a/scripts/waifulib/compiler_optimizations.py b/scripts/waifulib/compiler_optimizations.py index a50ea600..b531d958 100644 --- a/scripts/waifulib/compiler_optimizations.py +++ b/scripts/waifulib/compiler_optimizations.py @@ -186,6 +186,8 @@ def options(opt): def configure(conf): conf.start_msg('Build type') + conf.options.BUILD_TYPE = conf.options.BUILD_TYPE.lower() + # legacy naming for default release build # https://chaos.social/@karolherbst/111340511652012860 if conf.options.BUILD_TYPE == 'release':