Skip to content

Commit c7a4b27

Browse files
committed
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.
1 parent 8878216 commit c7a4b27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/g_svcmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ SV_FilterPacket(char *from)
168168
{
169169
if ((in & ipfilters[i].mask) == ipfilters[i].compare)
170170
{
171-
return (int)filterban->value;
171+
return (filterban->value != 0);
172172
}
173173
}
174174

175-
return (int)!filterban->value;
175+
return (filterban->value == 0);
176176
}
177177

178178
void

0 commit comments

Comments
 (0)