aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMike Mazur2008-08-15 00:55:16 +0000
committerMike Mazur2008-08-15 00:55:16 +0000
commit60acc370fcd98d8553fa19c5c866727d9fac25c7 (patch)
tree828be8829bb9255348477a94b47fa8ee1b93f6e6 /OpenSim/Region
parentRefactor: Make the tree creation function take a UUID for the owner (diff)
downloadopensim-SC-60acc370fcd98d8553fa19c5c866727d9fac25c7.zip
opensim-SC-60acc370fcd98d8553fa19c5c866727d9fac25c7.tar.gz
opensim-SC-60acc370fcd98d8553fa19c5c866727d9fac25c7.tar.bz2
opensim-SC-60acc370fcd98d8553fa19c5c866727d9fac25c7.tar.xz
Thanks, krtaylor, for a patch that fixes llListSort() and llListRandomize() failing with stride less than 1. Fix issue 1893.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs9
2 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 9d05526..e1a4648 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -3541,6 +3541,11 @@ namespace OpenSim.Region.ScriptEngine.Common
3541 public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending) 3541 public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending)
3542 { 3542 {
3543 m_host.AddScriptLPS(1); 3543 m_host.AddScriptLPS(1);
3544
3545 if (stride <= 0)
3546 {
3547 stride = 1;
3548 }
3544 return src.Sort(stride, ascending); 3549 return src.Sort(stride, ascending);
3545 } 3550 }
3546 3551
@@ -3855,8 +3860,10 @@ namespace OpenSim.Region.ScriptEngine.Common
3855 3860
3856 m_host.AddScriptLPS(1); 3861 m_host.AddScriptLPS(1);
3857 3862
3858 if (stride == 0) 3863 if (stride <= 0)
3864 {
3859 stride = 1; 3865 stride = 1;
3866 }
3860 3867
3861 // Stride MUST be a factor of the list length 3868 // Stride MUST be a factor of the list length
3862 // If not, then return the src list. This also 3869 // If not, then return the src list. This also
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e0614da..6c4f34a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3454,6 +3454,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3454 public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending) 3454 public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending)
3455 { 3455 {
3456 m_host.AddScriptLPS(1); 3456 m_host.AddScriptLPS(1);
3457
3458 if (stride <= 0)
3459 {
3460 stride = 1;
3461 }
3457 return src.Sort(stride, ascending); 3462 return src.Sort(stride, ascending);
3458 } 3463 }
3459 3464
@@ -3766,8 +3771,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3766 3771
3767 m_host.AddScriptLPS(1); 3772 m_host.AddScriptLPS(1);
3768 3773
3769 if (stride == 0) 3774 if (stride <= 0)
3775 {
3770 stride = 1; 3776 stride = 1;
3777 }
3771 3778
3772 // Stride MUST be a factor of the list length 3779 // Stride MUST be a factor of the list length
3773 // If not, then return the src list. This also 3780 // If not, then return the src list. This also