mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 03:15:41 +08:00
Fix problem with modInvoke defined integer constants being build into
scripts as boxed integers rather than proper reference to a new LSLInteger. This fixes an exception when using a registered integer constant in a script.
This commit is contained in:
@@ -319,7 +319,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
object[] convertedParms = new object[parms.Length];
|
||||
for (int i = 0; i < parms.Length; i++)
|
||||
convertedParms[i] = ConvertFromLSL(parms[i],signature[i], fname);
|
||||
convertedParms[i] = ConvertFromLSL(parms[i], signature[i], fname);
|
||||
|
||||
// now call the function, the contract with the function is that it will always return
|
||||
// non-null but don't trust it completely
|
||||
@@ -444,7 +444,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
|
||||
MODError(String.Format("{1}: parameter type mismatch; expecting {0}",type.Name, fname));
|
||||
MODError(String.Format("{0}: parameter type mismatch; expecting {1}, type(parm)={2}", fname, type.Name, lslparm.GetType()));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -937,7 +937,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
{
|
||||
string retval = null;
|
||||
if (value is int)
|
||||
retval = ((int)value).ToString();
|
||||
retval = String.Format("new LSL_Types.LSLInteger({0})",((int)value).ToString());
|
||||
else if (value is float)
|
||||
retval = String.Format("new LSL_Types.LSLFloat({0})",((float)value).ToString());
|
||||
else if (value is string)
|
||||
|
||||
Reference in New Issue
Block a user