mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-05 01:38:13 +00:00
Fix netid overflow check
This commit is contained in:
parent
0b1f7792e9
commit
6c94b9d07e
1 changed files with 3 additions and 3 deletions
|
|
@ -1262,12 +1262,12 @@ void CV_RegisterVar(consvar_t *variable)
|
|||
// check net variables
|
||||
if (variable->flags & CV_NETVAR)
|
||||
{
|
||||
variable->netid = ++consvar_number_of_netids;
|
||||
|
||||
/* in case of overflow... */
|
||||
if (variable->netid > consvar_number_of_netids)
|
||||
if (consvar_number_of_netids + 1 < consvar_number_of_netids)
|
||||
I_Error("Way too many netvars");
|
||||
|
||||
variable->netid = ++consvar_number_of_netids;
|
||||
|
||||
#ifdef OLD22DEMOCOMPAT
|
||||
CV_RegisterOldDemoVar(variable);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue