From d66de839385617bdcfb9a52de6bef8a5f496dbca Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Thu, 5 Jun 2008 19:30:35 +0000 Subject: Mantis#1459. Thank you kindly, CMickeyb for a patch that: the function that reports errors in event handling is not computing the line numbers correctly for windows paths (and probably linux paths). As a result, the conversion to int throws an exception. note... i'm not sure why we extract the line number, convert it to an int, then convert it back to a string... but hey... :-) --- .../ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common') diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index 43f9f03..11a9982 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs @@ -302,11 +302,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase int idx=t.IndexOf("SecondLife.Script."); if (idx != -1) { - int colon=t.IndexOf(":"); + // Need to skip past windows paths that have "c:\" in them + int colon=t.LastIndexOf(":"); if (-1 != colon) { - line = " at line " + Convert.ToInt32(t.Substring(colon + 1)).ToString(); + // Not sure why this is converted to an int then back to a string, either + // way, need to skip the word "line " in the substring + line = " at line " + Convert.ToInt32(t.Substring(colon + 6)).ToString(); break; } } -- cgit v1.1