diff options
author | Melanie Thielker | 2008-11-11 01:02:48 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-11 01:02:48 +0000 |
commit | 7eda940e7f776ff823eee1551265b65d14157f30 (patch) | |
tree | 4d16e20a584bef87be976cb42153d145fde74434 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC-7eda940e7f776ff823eee1551265b65d14157f30.zip opensim-SC-7eda940e7f776ff823eee1551265b65d14157f30.tar.gz opensim-SC-7eda940e7f776ff823eee1551265b65d14157f30.tar.bz2 opensim-SC-7eda940e7f776ff823eee1551265b65d14157f30.tar.xz |
Fix llList2Integer to have the same semantics as an (integer) cast. Handle
mixed number/letter content properly.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 6f9e0a0..d141ffe 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4167,12 +4167,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4167 | try | 4167 | try |
4168 | { | 4168 | { |
4169 | if (src.Data[index] is LSL_Integer) | 4169 | if (src.Data[index] is LSL_Integer) |
4170 | return Convert.ToInt32(((LSL_Integer) src.Data[index]).value); | 4170 | return (LSL_Integer) src.Data[index]; |
4171 | else if (src.Data[index] is LSL_Float) | 4171 | else if (src.Data[index] is LSL_Float) |
4172 | return Convert.ToInt32(((LSL_Float) src.Data[index]).value); | 4172 | return Convert.ToInt32(((LSL_Float) src.Data[index]).value); |
4173 | else if (src.Data[index] is LSL_String) | 4173 | return new LSL_Integer(src.Data[index].ToString()); |
4174 | return Convert.ToInt32(((LSL_String) src.Data[index]).m_string); | ||
4175 | return Convert.ToInt32(src.Data[index]); | ||
4176 | } | 4174 | } |
4177 | catch (FormatException) | 4175 | catch (FormatException) |
4178 | { | 4176 | { |