diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index 4969df031e..43905a7cb3 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs @@ -319,7 +319,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase // way, need to skip the word "line " in the substring try { - line = " at line " + Convert.ToInt32(t.Substring(colon + 6)).ToString(); + // ...if it is there. With mono --debug OpenSim.exe, + // you'll get the error in the format filename:linenumber + if(colon + 6 < t.Length && t.Substring(colon + 1, 5).Equals("line ")) colon += 6; + else ++colon; // else only skip the colon + line = " at line " + Convert.ToInt32(t.Substring(colon)).ToString(); } catch (ArgumentOutOfRangeException e2) {