From 5946b54a92165e5893a26c8abe3ec65cf0c2e5f3 Mon Sep 17 00:00:00 2001 From: Lachlan Date: Mon, 28 Sep 2020 11:38:56 +0800 Subject: [PATCH] Fix compiler warning --- src/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command.c b/src/command.c index 733ea5f12..fc9d44792 100644 --- a/src/command.c +++ b/src/command.c @@ -1263,7 +1263,7 @@ void CV_RegisterVar(consvar_t *variable) if (variable->flags & CV_NETVAR) { /* in case of overflow... */ - if (consvar_number_of_netids + 1 < consvar_number_of_netids) + if (consvar_number_of_netids == UINT16_MAX) I_Error("Way too many netvars"); variable->netid = ++consvar_number_of_netids;