From 625799419824e92df1949cb4a195730d4fad55de Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 9 Feb 2020 18:42:14 +0100 Subject: [PATCH] - fixed validation of hud_custom CVAR. --- source/common/gamecvars.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/gamecvars.cpp b/source/common/gamecvars.cpp index ac9388d2d..1608b4c16 100644 --- a/source/common/gamecvars.cpp +++ b/source/common/gamecvars.cpp @@ -214,7 +214,7 @@ int hud_statusbarrange; // will be set by the game's configuration setup. CUSTOM_CVARD(Int, hud_custom, 0, CVAR_ARCHIVE|CVAR_NOINITCALL, "change the custom hud") // this has no backing implementation, it seems to be solely for scripted HUDs. { if (self < 0) self = 0; - else if (self >= hud_statusbarrange) self = hud_statusbarrange - 1; + else if (self > 0 && self >= hud_statusbarrange) self = hud_statusbarrange - 1; } CVARD(Bool, hud_stats, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable level statistics display")