mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 05:45:37 +08:00
Mantis #1843
Applying DotNetEnine part of this patch. Thank you, nlin! Corrects ad hoc key list comparison.
This commit is contained in:
@@ -4385,11 +4385,11 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
{
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
if (src.Data[i].Equals(test.Data[0]))
|
||||
if (AreEqual(src.Data[i], test.Data[0]))
|
||||
{
|
||||
int j;
|
||||
for (j = 1; j < test.Length; j++)
|
||||
if (!src.Data[i+j].Equals(test.Data[j]))
|
||||
if (!AreEqual(src.Data[i+j], test.Data[j]))
|
||||
break;
|
||||
if (j == test.Length)
|
||||
{
|
||||
@@ -4404,6 +4404,18 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
|
||||
}
|
||||
|
||||
private bool AreEqual(object src, object test)
|
||||
{
|
||||
if (src.GetType().FullName == "System.String")
|
||||
{
|
||||
return src.ToString() == test.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return src.Equals(test);
|
||||
}
|
||||
}
|
||||
|
||||
public string llGetObjectName()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
Reference in New Issue
Block a user