aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-16 10:26:54 +0000
committerMelanie Thielker2008-09-16 10:26:54 +0000
commitf46fc508d18d925d09d64fa7d863c3b1fe7a66a0 (patch)
tree6b6dcd880fce229359c881a9ebf5b8de589f7ac3 /OpenSim/Region
parentMinor formatting cleanup. (diff)
downloadopensim-SC_OLD-f46fc508d18d925d09d64fa7d863c3b1fe7a66a0.zip
opensim-SC_OLD-f46fc508d18d925d09d64fa7d863c3b1fe7a66a0.tar.gz
opensim-SC_OLD-f46fc508d18d925d09d64fa7d863c3b1fe7a66a0.tar.bz2
opensim-SC_OLD-f46fc508d18d925d09d64fa7d863c3b1fe7a66a0.tar.xz
Mantis #1843
Applying DotNetEnine part of this patch. Thank you, nlin! Corrects ad hoc key list comparison.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 5d6cd37..44033c1 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -4385,11 +4385,11 @@ namespace OpenSim.Region.ScriptEngine.Common
4385 { 4385 {
4386 for (int i = 0; i < length; i++) 4386 for (int i = 0; i < length; i++)
4387 { 4387 {
4388 if (src.Data[i].Equals(test.Data[0])) 4388 if (AreEqual(src.Data[i], test.Data[0]))
4389 { 4389 {
4390 int j; 4390 int j;
4391 for (j = 1; j < test.Length; j++) 4391 for (j = 1; j < test.Length; j++)
4392 if (!src.Data[i+j].Equals(test.Data[j])) 4392 if (!AreEqual(src.Data[i+j], test.Data[j]))
4393 break; 4393 break;
4394 if (j == test.Length) 4394 if (j == test.Length)
4395 { 4395 {
@@ -4404,6 +4404,18 @@ namespace OpenSim.Region.ScriptEngine.Common
4404 4404
4405 } 4405 }
4406 4406
4407 private bool AreEqual(object src, object test)
4408 {
4409 if (src.GetType().FullName == "System.String")
4410 {
4411 return src.ToString() == test.ToString();
4412 }
4413 else
4414 {
4415 return src.Equals(test);
4416 }
4417 }
4418
4407 public string llGetObjectName() 4419 public string llGetObjectName()
4408 { 4420 {
4409 m_host.AddScriptLPS(1); 4421 m_host.AddScriptLPS(1);