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