aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorCharles Krinke2008-07-12 17:11:43 +0000
committerCharles Krinke2008-07-12 17:11:43 +0000
commit132b95ec95f209b8b2ba5842ae03baf870cef6d1 (patch)
treee3bc1be9d48e492f5dc83680649498087107fe1c /OpenSim
parentMantis#1716. Thank you kindly, Nlin for a patch that: (diff)
downloadopensim-SC-132b95ec95f209b8b2ba5842ae03baf870cef6d1.zip
opensim-SC-132b95ec95f209b8b2ba5842ae03baf870cef6d1.tar.gz
opensim-SC-132b95ec95f209b8b2ba5842ae03baf870cef6d1.tar.bz2
opensim-SC-132b95ec95f209b8b2ba5842ae03baf870cef6d1.tar.xz
Mantis#1714. Thank you kindly, Krtaylor for a patch that:
Solves llGetListLength fails scripts when list is not initialized.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs10
2 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 8ae2456..53d1209 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -3355,7 +3355,15 @@ namespace OpenSim.Region.ScriptEngine.Common
3355 public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src) 3355 public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src)
3356 { 3356 {
3357 m_host.AddScriptLPS(1); 3357 m_host.AddScriptLPS(1);
3358 return src.Length; 3358
3359 if (src == null)
3360 {
3361 return 0;
3362 }
3363 else
3364 {
3365 return src.Length;
3366 }
3359 } 3367 }
3360 3368
3361 public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index) 3369 public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 3fbe257..8edd169 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3299,7 +3299,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3299 public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src) 3299 public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src)
3300 { 3300 {
3301 m_host.AddScriptLPS(1); 3301 m_host.AddScriptLPS(1);
3302 return src.Length; 3302
3303 if (src == null)
3304 {
3305 return 0;
3306 }
3307 else
3308 {
3309 return src.Length;
3310 }
3303 } 3311 }
3304 3312
3305 public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index) 3313 public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index)