From f9769a9fcb84a68622abe23160274796937ae0d4 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 28 Jun 2012 00:37:23 +0100 Subject: [PATCH] minor: reuse colon index calculation in XEngine.OnRezScript. The index if a colon is found on the first line will always be the same as for the whole script. --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 06ed9d6deb..73d384d098 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -768,12 +768,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine int colon = firstline.IndexOf(':'); if (firstline.Length > 2 && firstline.Substring(0, 2) == "//" && colon != -1) { - string engineName = firstline.Substring(2, colon-2); + string engineName = firstline.Substring(2, colon - 2); if (names.Contains(engineName)) { engine = engineName; - script = "//" + script.Substring(script.IndexOf(':')+1); + script = "//" + script.Substring(colon + 1); } else {