aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-08-30 21:12:58 +0000
committerJustin Clarke Casey2008-08-30 21:12:58 +0000
commite4ec9829cd009e3bbef8bda48d0883056014f1f6 (patch)
tree47e709637df25e11795b02d4cda6eba146a26249 /OpenSim/Region/ScriptEngine
parent* Oops, add landmarks to region archive loading/saving (diff)
downloadopensim-SC_OLD-e4ec9829cd009e3bbef8bda48d0883056014f1f6.zip
opensim-SC_OLD-e4ec9829cd009e3bbef8bda48d0883056014f1f6.tar.gz
opensim-SC_OLD-e4ec9829cd009e3bbef8bda48d0883056014f1f6.tar.bz2
opensim-SC_OLD-e4ec9829cd009e3bbef8bda48d0883056014f1f6.tar.xz
* Apply cmickeyb's patch from mantis 2068
* llParseString functions throw exception when passed a list of variables * Thanks!
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs21
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index f10a854..a32ffe2 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -4526,12 +4526,12 @@ namespace OpenSim.Region.ScriptEngine.Common
4526 { 4526 {
4527 int index = str.IndexOf(delimiters[i].ToString()); 4527 int index = str.IndexOf(delimiters[i].ToString());
4528 bool found = index != -1; 4528 bool found = index != -1;
4529 if (found && String.Empty != (string)delimiters[i]) 4529 if (found && String.Empty != delimiters[i].ToString())
4530 { 4530 {
4531 if ((cindex > index) || (cindex == -1)) 4531 if ((cindex > index) || (cindex == -1))
4532 { 4532 {
4533 cindex = index; 4533 cindex = index;
4534 cdeli = (string)delimiters[i]; 4534 cdeli = delimiters[i].ToString();
4535 } 4535 }
4536 dfound = dfound || found; 4536 dfound = dfound || found;
4537 } 4537 }
@@ -4541,9 +4541,14 @@ namespace OpenSim.Region.ScriptEngine.Common
4541 if (cindex > 0) 4541 if (cindex > 0)
4542 { 4542 {
4543 ret.Add(str.Substring(0, cindex)); 4543 ret.Add(str.Substring(0, cindex));
4544 if (spacers.Contains(cdeli)) 4544 // Cannot use spacers.Contains() because spacers may be either type String or LSLString
4545 for (int j = 0; j < spacers.Length; j++)
4545 { 4546 {
4546 ret.Add(cdeli); 4547 if (spacers.Data[j].ToString() == cdeli)
4548 {
4549 ret.Add(cdeli);
4550 break;
4551 }
4547 } 4552 }
4548 } 4553 }
4549 if (cindex == 0 && spacers.Contains(cdeli)) 4554 if (cindex == 0 && spacers.Contains(cdeli))
@@ -6786,7 +6791,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6786 if (active[j]) 6791 if (active[j])
6787 { 6792 {
6788 // scan all of the markers 6793 // scan all of the markers
6789 if ((offset[j] = src.IndexOf((string)separray[j],beginning)) == -1) 6794 if ((offset[j] = src.IndexOf(separray[j].ToString(),beginning)) == -1)
6790 { 6795 {
6791 // not present at all 6796 // not present at all
6792 active[j] = false; 6797 active[j] = false;
@@ -6814,7 +6819,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6814 if (active[j]) 6819 if (active[j])
6815 { 6820 {
6816 // scan all of the markers 6821 // scan all of the markers
6817 if ((offset[j] = src.IndexOf((string)spcarray[j-seplen], beginning)) == -1) 6822 if ((offset[j] = src.IndexOf(spcarray[j-seplen].ToString(), beginning)) == -1)
6818 { 6823 {
6819 // not present at all 6824 // not present at all
6820 active[j] = false; 6825 active[j] = false;
@@ -6849,11 +6854,11 @@ namespace OpenSim.Region.ScriptEngine.Common
6849 6854
6850 if (best < seplen) 6855 if (best < seplen)
6851 { 6856 {
6852 beginning = offset[best] + ((string)separray[best]).Length; 6857 beginning = offset[best] + (separray[best].ToString()).Length;
6853 } 6858 }
6854 else 6859 else
6855 { 6860 {
6856 beginning = offset[best] + ((string)spcarray[best - seplen]).Length; 6861 beginning = offset[best] + (spcarray[best - seplen].ToString()).Length;
6857 tokens.Add(spcarray[best - seplen]); 6862 tokens.Add(spcarray[best - seplen]);
6858 } 6863 }
6859 } 6864 }