mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 03:15:41 +08:00
YEngine store a bool as integer on a lsl list in one initialization case
This commit is contained in:
@@ -1124,8 +1124,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
object[] tmp;
|
||||
if (m_data is null || m_data.Length == 0)
|
||||
{
|
||||
tmp = new object[1];
|
||||
tmp.SetValue(o, 0);
|
||||
tmp = new object[] {o};
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1194,8 +1193,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
object[] tmp;
|
||||
if (m_data is null || m_data.Length == 0)
|
||||
{
|
||||
tmp = new object[1];
|
||||
tmp[0] = o;
|
||||
tmp = new object[] { o };
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -4908,12 +4908,17 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
ilGen.Emit(val, OpCodes.Newobj, lslFloatConstructorInfo);
|
||||
ilGen.Emit(val, OpCodes.Box, typeof(LSL_Float));
|
||||
}
|
||||
else if(eRVal.type is TokenTypeInt)
|
||||
else if (eRVal.type is TokenTypeInt)
|
||||
{
|
||||
ilGen.Emit(val, OpCodes.Newobj, lslIntegerConstructorInfo);
|
||||
ilGen.Emit(val, OpCodes.Box, typeof(LSL_Integer));
|
||||
}
|
||||
else if((eRVal.type is TokenTypeKey) || (eRVal.type is TokenTypeStr))
|
||||
else if (eRVal.type is TokenTypeBool)
|
||||
{
|
||||
ilGen.Emit(val, OpCodes.Newobj, lslIntegerConstructorInfo);
|
||||
ilGen.Emit(val, OpCodes.Box, typeof(LSL_Integer));
|
||||
}
|
||||
else if ((eRVal.type is TokenTypeKey) || (eRVal.type is TokenTypeStr))
|
||||
{
|
||||
ilGen.Emit(val, OpCodes.Newobj, lslStringConstructorInfo);
|
||||
ilGen.Emit(val, OpCodes.Box, typeof(LSL_String));
|
||||
|
||||
Reference in New Issue
Block a user