diff --git a/Server/Map.cs b/Server/Map.cs index 473c2d2be..9119916ff 100644 --- a/Server/Map.cs +++ b/Server/Map.cs @@ -1350,6 +1350,11 @@ namespace Server { ++m_CurrentIndex; + if (m_CurrentIndex < 0 || m_CurrentIndex > m_CurrentList.Count) { // Sanity + Console.WriteLine("EntityEnumerator OOB: {0}", m_CurrentIndex); + return false; + } + if (m_CurrentIndex == m_CurrentList.Count) { ++m_ySector; @@ -2104,4 +2109,4 @@ namespace Server throw new ArgumentException(); } } -} \ No newline at end of file +}