mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Fix for index error in llList2String
This commit is contained in:
@@ -4660,7 +4660,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
index = src.Length + index;
|
||||
}
|
||||
if (index >= src.Length)
|
||||
if (index >= src.Length || index < 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -4685,7 +4685,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
index = src.Length + index;
|
||||
}
|
||||
if (index >= src.Length)
|
||||
if (index >= src.Length || index < 0)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
@@ -4712,7 +4712,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
index = src.Length + index;
|
||||
}
|
||||
if (index >= src.Length)
|
||||
if (index >= src.Length || index < 0)
|
||||
{
|
||||
return String.Empty;
|
||||
}
|
||||
@@ -4726,7 +4726,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
index = src.Length + index;
|
||||
}
|
||||
if (index >= src.Length)
|
||||
if (index >= src.Length || index < 0)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
@@ -4740,7 +4740,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
index = src.Length + index;
|
||||
}
|
||||
if (index >= src.Length)
|
||||
if (index >= src.Length || index < 0)
|
||||
{
|
||||
return new LSL_Vector(0, 0, 0);
|
||||
}
|
||||
@@ -4761,7 +4761,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
index = src.Length + index;
|
||||
}
|
||||
if (index >= src.Length)
|
||||
if (index >= src.Length || index < 0)
|
||||
{
|
||||
return new LSL_Rotation(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user