Mantis#1714. Thank you kindly, Krtaylor for a patch that:

Solves llGetListLength fails scripts when list is not initialized.
0.6.0-stable
Charles Krinke 2008-07-12 17:11:43 +00:00
parent bdec1aea92
commit 132b95ec95
2 changed files with 18 additions and 2 deletions

View File

@ -3355,7 +3355,15 @@ namespace OpenSim.Region.ScriptEngine.Common
public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src) public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
return src.Length;
if (src == null)
{
return 0;
}
else
{
return src.Length;
}
} }
public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index) public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index)

View File

@ -3299,7 +3299,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src) public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
return src.Length;
if (src == null)
{
return 0;
}
else
{
return src.Length;
}
} }
public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index) public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index)