aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-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);