Fix signed integer overflow in time calculation
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user