From 86a5545fa8aaf96795465b28080558975947e6d2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 9 Jun 2022 08:36:11 +0200 Subject: [PATCH] - fixed division by zero with unvalidated ticdup values. --- src/d_net.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/d_net.cpp b/src/d_net.cpp index d2d2288f1..abe3c83ec 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -1461,7 +1461,7 @@ bool DoArbitrate (void *userdata) { data->gotsetup[0] = 0x80; - ticdup = doomcom.ticdup = netbuffer[1]; + ticdup = doomcom.ticdup = clamp(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; }