Use ToString() rather than a cast (more robust)
parent
2c6a410e90
commit
d8fd777e13
|
@ -560,7 +560,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
|||
else if (m_data[itemIndex] is Int32)
|
||||
return new LSLInteger((int)m_data[itemIndex]);
|
||||
else if (m_data[itemIndex] is LSL_Types.LSLString)
|
||||
return new LSLInteger((string)m_data[itemIndex]);
|
||||
return new LSLInteger(m_data[itemIndex].ToString());
|
||||
else
|
||||
throw new InvalidCastException();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue