From 650bb761d3e5af3f8fa19ac8d22864cc0360d085 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 15 Nov 2025 19:31:12 +0000 Subject: Fix incorrect gamedata short-circuiting Gamedata bugs are the gift that keeps on giving. This was making vgui stuff fail in L4D2 because the other outer conditions would match first. It's perhaps unfortunate that we have to remove short-circuiting in cases where it would work fine, but who knows, maybe the compiler would be smart enough to figure it out anyway. At any rate it's necessary for correctness, so whatever. --- src/build/mkgamedata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/build/mkgamedata.c') diff --git a/src/build/mkgamedata.c b/src/build/mkgamedata.c index 2ae9228..e0d08f3 100644 --- a/src/build/mkgamedata.c +++ b/src/build/mkgamedata.c @@ -260,7 +260,7 @@ Fi(" if (%sGAMETYPE_MATCHES(%s)) {", excl, sbase + tags[i] + neg); else { _i("}") F( "#line %d \"%" fS "\"", srclines[i], srcnames[srcfiles[i]]) -Fi("else if (%sGAMETYPE_MATCHES(%s)) {", excl, sbase + tags[i] + neg); +Fi("if (%sGAMETYPE_MATCHES(%s)) {", excl, sbase + tags[i] + neg); } if (exprs[i]) { F( "#line %d \"%" fS "\"", srclines[i], srcnames[srcfiles[i]]) -- cgit v1.2.3-54-g00ecf