Skip to content

Commit

Permalink
- fixed division by zero with unvalidated ticdup values.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Jun 9, 2022
1 parent eb56eb3 commit 86a5545
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/d_net.cpp
Expand Up @@ -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];
Expand Down Expand Up @@ -1884,7 +1884,7 @@ void TryRunTics (void)
}
}

if (ticdup == 1)
if (ticdup <= 1)
{
availabletics = lowtic - gametic;
}
Expand Down

0 comments on commit 86a5545

Please sign in to comment.