Fix for integer overflow causing crash (http://www.runuo.com/forums/showthread.php?p=599228).
This commit is contained in:
parent
a8c7e51e6d
commit
e331bf15f0
1 changed files with 1 additions and 1 deletions
|
|
@ -459,7 +459,7 @@ namespace Server
|
|||
if( (++sample % sampleInterval) == 0 )
|
||||
{
|
||||
now = DateTime.Now;
|
||||
m_CyclesPerSecond[m_CycleIndex++ % m_CyclesPerSecond.Length] =
|
||||
m_CyclesPerSecond[Math.Max( 0, m_CycleIndex++ % m_CyclesPerSecond.Length )] =
|
||||
ticksPerSecond / (now.Ticks - last.Ticks);
|
||||
last = now;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue