diff options
author | Justin Clark-Casey (justincc) | 2012-06-28 00:37:23 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-06-28 00:37:23 +0100 |
commit | f9769a9fcb84a68622abe23160274796937ae0d4 (patch) | |
tree | 55df8a45fe3f2aa5db172e30829102daac7b9530 | |
parent | Fix issue in InventoryArchiveTestCase where it didn't call down to OpenSimTes... (diff) | |
download | opensim-SC_OLD-f9769a9fcb84a68622abe23160274796937ae0d4.zip opensim-SC_OLD-f9769a9fcb84a68622abe23160274796937ae0d4.tar.gz opensim-SC_OLD-f9769a9fcb84a68622abe23160274796937ae0d4.tar.bz2 opensim-SC_OLD-f9769a9fcb84a68622abe23160274796937ae0d4.tar.xz |
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.
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 06ed9d6..73d384d 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -768,12 +768,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
768 | int colon = firstline.IndexOf(':'); | 768 | int colon = firstline.IndexOf(':'); |
769 | if (firstline.Length > 2 && firstline.Substring(0, 2) == "//" && colon != -1) | 769 | if (firstline.Length > 2 && firstline.Substring(0, 2) == "//" && colon != -1) |
770 | { | 770 | { |
771 | string engineName = firstline.Substring(2, colon-2); | 771 | string engineName = firstline.Substring(2, colon - 2); |
772 | 772 | ||
773 | if (names.Contains(engineName)) | 773 | if (names.Contains(engineName)) |
774 | { | 774 | { |
775 | engine = engineName; | 775 | engine = engineName; |
776 | script = "//" + script.Substring(script.IndexOf(':')+1); | 776 | script = "//" + script.Substring(colon + 1); |
777 | } | 777 | } |
778 | else | 778 | else |
779 | { | 779 | { |