diff options
author | Melanie Thielker | 2008-09-08 19:29:16 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-08 19:29:16 +0000 |
commit | 6447d7132f0f443205e719a00e595f79444eea25 (patch) | |
tree | d28bbcc81e3ba99085ff679f29116111327b8c49 /OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |
parent | Mantis #2147 (diff) | |
download | opensim-SC_OLD-6447d7132f0f443205e719a00e595f79444eea25.zip opensim-SC_OLD-6447d7132f0f443205e719a00e595f79444eea25.tar.gz opensim-SC_OLD-6447d7132f0f443205e719a00e595f79444eea25.tar.bz2 opensim-SC_OLD-6447d7132f0f443205e719a00e595f79444eea25.tar.xz |
Adapt the unit tests to the new list rules, change some casts to
new method for testing
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 4554b0c..f149f60 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -454,7 +454,12 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
454 | 454 | ||
455 | public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex) | 455 | public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex) |
456 | { | 456 | { |
457 | return (LSL_Types.LSLInteger)m_data[itemIndex]; | 457 | if (m_data[itemIndex] is LSL_Types.LSLInteger) |
458 | return (LSL_Types.LSLInteger)m_data[itemIndex]; | ||
459 | else if (m_data[itemIndex] is Int32) | ||
460 | return new LSLInteger((int)m_data[itemIndex]); | ||
461 | else | ||
462 | throw new InvalidCastException(); | ||
458 | } | 463 | } |
459 | 464 | ||
460 | public LSL_Types.Vector3 GetVector3Item(int itemIndex) | 465 | public LSL_Types.Vector3 GetVector3Item(int itemIndex) |