diff --git a/mp/src/game/shared/neo/neo_gamerules.cpp b/mp/src/game/shared/neo/neo_gamerules.cpp index f0a9de728..c6e907f55 100644 --- a/mp/src/game/shared/neo/neo_gamerules.cpp +++ b/mp/src/game/shared/neo/neo_gamerules.cpp @@ -1321,7 +1321,7 @@ bool CNEORules::ClientConnected(edict_t *pEntity, const char *pszName, const cha DevWarning("Client debug build integrity check bypass! Client: %s | Server: %s\n", clientGitHash, GIT_LONGHASH); } // NEO NOTE (nullsystem): Due to debug builds, if we're to match exactly, we'll have to mask out final bit first - char cmpClientGitHash[sizeof(GIT_LONGHASH) + 1]; + char cmpClientGitHash[GIT_LONGHASH_SIZE + 1]; V_strcpy_safe(cmpClientGitHash, clientGitHash); cmpClientGitHash[0] &= 0b0111'1111; if (!dbgBuildSkip && V_strcmp(cmpClientGitHash, GIT_LONGHASH)) diff --git a/mp/src/game/shared/neo/neo_version.cpp b/mp/src/game/shared/neo/neo_version.cpp index 67a342db0..316478930 100644 --- a/mp/src/game/shared/neo/neo_version.cpp +++ b/mp/src/game/shared/neo/neo_version.cpp @@ -45,7 +45,7 @@ ConVar __neo_cl_git_hash("__neo_cl_git_hash", GIT_LONGHASH, #if defined(CLIENT_DLL) && defined(DEBUG) void InitializeDbgNeoClGitHashEdit() { - static char static_dbgHash[sizeof(GIT_LONGHASH) + 1]; + static char static_dbgHash[GIT_LONGHASH_SIZE]; V_strcpy_safe(static_dbgHash, GIT_LONGHASH); static_dbgHash[0] = static_dbgHash[0] | 0b1000'0000; __neo_cl_git_hash.SetDefault(static_dbgHash); diff --git a/mp/src/game/shared/neo/neo_version_info.h b/mp/src/game/shared/neo/neo_version_info.h index ee07c9e5e..9609a847f 100644 --- a/mp/src/game/shared/neo/neo_version_info.h +++ b/mp/src/game/shared/neo/neo_version_info.h @@ -4,6 +4,7 @@ extern const char* BUILD_DATE_SHORT; extern const char* BUILD_DATE_LONG; extern const char* GIT_HASH; extern const char* GIT_LONGHASH; +static constexpr int GIT_LONGHASH_SIZE = 41; extern const char* OS_BUILD; extern const char* COMPILER_ID; extern const char* COMPILER_VERSION;