mirror of
https://github.com/opensim/opensim.git
synced 2026-07-30 21:38:46 +08:00
Use ToString() rather than a cast (more robust)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user