Fix signed integer overflow in time calculation

This commit is contained in:
2026-01-17 01:14:51 +01:00
parent 9948716be8
commit 028f25b942
+2 -2
View File
@@ -1041,7 +1041,7 @@ static void host_init(Host *host, Sim *sim, QuakeySpawn config, char *arg)
}
if (host->poll_timeout > -1)
time_event_wakeup(host->sim, host->sim->current_time + host->poll_timeout * 1000000, host);
time_event_wakeup(host->sim, host->sim->current_time + (Nanos)host->poll_timeout * 1000000ULL, host);
}
static void host_free(Host *host)
@@ -1227,7 +1227,7 @@ static void host_update(Host *host)
}
if (host->poll_timeout > -1)
time_event_wakeup(host->sim, host->sim->current_time + host->poll_timeout * 1000000, host);
time_event_wakeup(host->sim, host->sim->current_time + (Nanos)host->poll_timeout * 1000000ULL, host);
}
static bool host_has_addr(Host *host, Addr addr)