- fixed division by zero with unvalidated ticdup values.

This commit is contained in:
Christoph Oelckers 2022-06-09 08:36:11 +02:00
parent eb56eb380e
commit 86a5545fa8

View file

@ -1461,7 +1461,7 @@ bool DoArbitrate (void *userdata)
{
data->gotsetup[0] = 0x80;
ticdup = doomcom.ticdup = netbuffer[1];
ticdup = doomcom.ticdup = clamp<int>(netbuffer[1], 1, MAXTICDUP);
NetMode = netbuffer[2];
stream = &netbuffer[3];
@ -1884,7 +1884,7 @@ void TryRunTics (void)
}
}
if (ticdup == 1)
if (ticdup <= 1)
{
availabletics = lowtic - gametic;
}