From 182693628ca1b81c90f3f0296418437eda406bb5 Mon Sep 17 00:00:00 2001 From: Snowcrash Date: Mon, 19 Oct 2009 13:03:14 +0200 Subject: Fix for index error in llList2String --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e10e612..224b3cc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -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); } -- cgit v1.1 From d88bb83136752fadb1c2e3b64641acc2b3b6dd30 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 21 Oct 2009 20:47:24 +0100 Subject: Fix llParticleSystem to accept LSL variables and LSL constants in place of the named constants for the rule selector. Information provided by Snowcrash --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 224b3cc..9a70890 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5844,7 +5844,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api for (int i = 0; i < rules.Length; i += 2) { - switch ((int)rules.Data[i]) + switch (Convert.ToInt32(rules.Data[i])) { case (int)ScriptBaseClass.PSYS_PART_FLAGS: prules.PartDataFlags = (Primitive.ParticleSystem.ParticleDataFlags)(uint)rules.GetLSLIntegerItem(i + 1); -- cgit v1.1