Thanks, krtaylor, for a patch that fixes llListSort() and llListRandomize() failing with stride less than 1. Fix issue 1893.
parent
4041194db9
commit
60acc370fc
|
@ -3541,6 +3541,11 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (stride <= 0)
|
||||
{
|
||||
stride = 1;
|
||||
}
|
||||
return src.Sort(stride, ascending);
|
||||
}
|
||||
|
||||
|
@ -3855,8 +3860,10 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (stride == 0)
|
||||
if (stride <= 0)
|
||||
{
|
||||
stride = 1;
|
||||
}
|
||||
|
||||
// Stride MUST be a factor of the list length
|
||||
// If not, then return the src list. This also
|
||||
|
|
|
@ -3454,6 +3454,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (stride <= 0)
|
||||
{
|
||||
stride = 1;
|
||||
}
|
||||
return src.Sort(stride, ascending);
|
||||
}
|
||||
|
||||
|
@ -3766,8 +3771,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (stride == 0)
|
||||
if (stride <= 0)
|
||||
{
|
||||
stride = 1;
|
||||
}
|
||||
|
||||
// Stride MUST be a factor of the list length
|
||||
// If not, then return the src list. This also
|
||||
|
|
Loading…
Reference in New Issue