aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
diff options
context:
space:
mode:
authorJeff Ames2008-03-23 00:39:35 +0000
committerJeff Ames2008-03-23 00:39:35 +0000
commit0d43aaa337c1ee3752392aa87d49a6d55e555848 (patch)
tree79d7e89cbc986c7c856ab9d1f9e45cb6a1b65841 /OpenSim/Region/ScriptEngine/Common
parentFix compiler warnings in pCampBot, TestSuite, and ScriptEngine/RemoteServer. ... (diff)
downloadopensim-SC-0d43aaa337c1ee3752392aa87d49a6d55e555848.zip
opensim-SC-0d43aaa337c1ee3752392aa87d49a6d55e555848.tar.gz
opensim-SC-0d43aaa337c1ee3752392aa87d49a6d55e555848.tar.bz2
opensim-SC-0d43aaa337c1ee3752392aa87d49a6d55e555848.tar.xz
Fix llParseString2List bug when separator is longer than 1 character.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs18
1 files changed, 8 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 62dcf8c..6438312 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -2685,25 +2685,25 @@ namespace OpenSim.Region.ScriptEngine.Common
2685 { 2685 {
2686 m_host.AddScriptLPS(1); 2686 m_host.AddScriptLPS(1);
2687 LSL_Types.list ret = new LSL_Types.list(); 2687 LSL_Types.list ret = new LSL_Types.list();
2688 object[] delimeters = new object[separators.Length + spacers.Length]; 2688 object[] delimiters = new object[separators.Length + spacers.Length];
2689 separators.Data.CopyTo(delimeters, 0); 2689 separators.Data.CopyTo(delimiters, 0);
2690 spacers.Data.CopyTo(delimeters, separators.Length); 2690 spacers.Data.CopyTo(delimiters, separators.Length);
2691 bool dfound = false; 2691 bool dfound = false;
2692 do 2692 do
2693 { 2693 {
2694 dfound = false; 2694 dfound = false;
2695 int cindex = -1; 2695 int cindex = -1;
2696 string cdeli = ""; 2696 string cdeli = "";
2697 for (int i = 0; i < delimeters.Length; i++) 2697 for (int i = 0; i < delimiters.Length; i++)
2698 { 2698 {
2699 int index = str.IndexOf(delimeters[i].ToString()); 2699 int index = str.IndexOf(delimiters[i].ToString());
2700 bool found = index != -1; 2700 bool found = index != -1;
2701 if (found) 2701 if (found)
2702 { 2702 {
2703 if ((cindex > index) || (cindex == -1)) 2703 if ((cindex > index) || (cindex == -1))
2704 { 2704 {
2705 cindex = index; 2705 cindex = index;
2706 cdeli = (string)delimeters[i]; 2706 cdeli = (string)delimiters[i];
2707 } 2707 }
2708 dfound = dfound || found; 2708 dfound = dfound || found;
2709 } 2709 }
@@ -2722,16 +2722,14 @@ namespace OpenSim.Region.ScriptEngine.Common
2722 { 2722 {
2723 ret.Add(cdeli); 2723 ret.Add(cdeli);
2724 } 2724 }
2725 str = str.Substring(cindex + 1); 2725 str = str.Substring(cindex + cdeli.Length);
2726 } 2726 }
2727 } 2727 } while (dfound);
2728 while (dfound);
2729 if (str != "") 2728 if (str != "")
2730 { 2729 {
2731 ret.Add(str); 2730 ret.Add(str);
2732 } 2731 }
2733 return ret; 2732 return ret;
2734
2735 } 2733 }
2736 2734
2737 public int llOverMyLand(string id) 2735 public int llOverMyLand(string id)