From d8fd777e1338d1cffb28ffddd504eb45e7a02a5c Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 11 Jan 2011 14:59:55 +0100 Subject: [PATCH] Use ToString() rather than a cast (more robust) --- OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 5fd5bcf42b..f810fd8250 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs @@ -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(); }