From 3ab00e4b9212dd89ba9246ac29e871d9331c7ac5 Mon Sep 17 00:00:00 2001 From: Yamagi Date: Sat, 15 Mar 2025 17:48:41 +0100 Subject: [PATCH] Fix (potential) problematic use cases of qboolean. xatrix had only one potential problematic use case, putting an int into qboolean. It would have worked if qboolean is a bool, but better do it right. No functional change intended. --- src/g_svcmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_svcmds.c b/src/g_svcmds.c index ac5b643..affc0ec 100644 --- a/src/g_svcmds.c +++ b/src/g_svcmds.c @@ -158,11 +158,11 @@ SV_FilterPacket(char *from) { if ((in & ipfilters[i].mask) == ipfilters[i].compare) { - return (int)filterban->value; + return (filterban->value != 0); } } - return (int)!filterban->value; + return (filterban->value == 0); } void