aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs
index 24e8f85..f856ea5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs
@@ -133,8 +133,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
133 { 133 {
134 LSL_Types.list v = (LSL_Types.list)field.GetValue(this); 134 LSL_Types.list v = (LSL_Types.list)field.GetValue(this);
135 Object[] data = new Object[v.Data.Length]; 135 Object[] data = new Object[v.Data.Length];
136 Array.Copy(data, 0, v.Data, 0, v.Data.Length); 136 Array.Copy(v.Data, 0, data, 0, v.Data.Length);
137 vars[field.Name] = data; 137 LSL_Types.list c = new LSL_Types.list();
138 c.Data = data;
139 vars[field.Name] = c;
138 } 140 }
139 else 141 else
140 { 142 {
@@ -151,12 +153,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
151 { 153 {
152 if (m_Fields.ContainsKey(var.Key)) 154 if (m_Fields.ContainsKey(var.Key))
153 { 155 {
154 if (m_Fields[var.Key].FieldType is LSL_Types.list) 156 if (m_Fields[var.Key].FieldType == typeof(LSL_Types.list))
155 { 157 {
156 LSL_Types.list v = (LSL_Types.list)m_Fields[var.Key].GetValue(this); 158 LSL_Types.list v = (LSL_Types.list)m_Fields[var.Key].GetValue(this);
157 Object[] data = (Object[])var.Value; 159 Object[] data = (Object[])var.Value;
158 v.Data = new Object[data.Length]; 160 v.Data = new Object[data.Length];
159 Array.Copy(v.Data, 0, data, 0, data.Length); 161 Array.Copy(data, 0, v.Data, 0, data.Length);
160 m_Fields[var.Key].SetValue(this, v); 162 m_Fields[var.Key].SetValue(this, v);
161 } 163 }
162 else 164 else