mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Fix netid overflow check
This commit is contained in:
parent
30057e9268
commit
ca9cf25423
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…
Reference in a new issue