mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-25 21:14:22 +01:00
Hack to avoid div-by-zero
This commit is contained in:
parent
115a12b958
commit
619fcc1be5
@ -121,6 +121,8 @@ Network::~Network()
|
|||||||
|
|
||||||
void Network::Tick(int ms)
|
void Network::Tick(int ms)
|
||||||
{
|
{
|
||||||
|
if (ms == 0)
|
||||||
|
ms = 1;
|
||||||
int last_kbps = ((this->traffic - this->last_traffic) * 8) * (1000 / ms);
|
int last_kbps = ((this->traffic - this->last_traffic) * 8) * (1000 / ms);
|
||||||
|
|
||||||
/* 1/3 of the new value, 2/3 of the old */
|
/* 1/3 of the new value, 2/3 of the old */
|
||||||
|
Loading…
Reference in New Issue
Block a user