mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
Fix mantis #6170 - Check if first argument of PRIM_TEXT is string or key
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
This commit is contained in:
@@ -10155,14 +10155,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||||||
LSL_Vector primTextColor;
|
LSL_Vector primTextColor;
|
||||||
LSL_Float primTextAlpha;
|
LSL_Float primTextAlpha;
|
||||||
|
|
||||||
try
|
object o = rules.Data[idx];
|
||||||
{
|
if (o is LSL_Types.LSLString || o is LSL_Types.key)
|
||||||
primText = rules.GetLSLStringItem(idx++);
|
primText = rules.GetLSLStringItem(idx++);
|
||||||
}
|
else
|
||||||
catch(InvalidCastException)
|
|
||||||
{
|
{
|
||||||
Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1));
|
//throw new InvalidCastException(string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1));
|
||||||
return new LSL_List();
|
Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1));
|
||||||
|
return new LSL_List();
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user