From 6571b05f330feaedfa68901764cb58408ba03983 Mon Sep 17 00:00:00 2001 From: msturgill Date: Wed, 15 Jan 2014 14:43:49 -0700 Subject: [PATCH] temporary edge-case fix --- Server/Map.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 +}