aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_Types.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
index 74c9935..d0a5079 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
@@ -1172,7 +1172,8 @@ namespace OpenSim.Region.ScriptEngine.Common
1172 1172
1173 public static explicit operator LSLInteger(LSLString s) 1173 public static explicit operator LSLInteger(LSLString s)
1174 { 1174 {
1175 return new LSLInteger(Convert.ToInt32(s.m_string)); 1175 // double.Parse() used because s could be "123.9" for example.
1176 return new LSLInteger(double.Parse(s.m_string));
1176 } 1177 }
1177 1178
1178 public static explicit operator LSLString(double d) 1179 public static explicit operator LSLString(double d)
@@ -1283,7 +1284,8 @@ namespace OpenSim.Region.ScriptEngine.Common
1283 1284
1284 static public explicit operator LSLInteger(string s) 1285 static public explicit operator LSLInteger(string s)
1285 { 1286 {
1286 return new LSLInteger(int.Parse(s)); 1287 // double.Parse() used because s could be "123.9" for example.
1288 return new LSLInteger(double.Parse(s));
1287 } 1289 }
1288 1290
1289 static public implicit operator LSLInteger(uint u) 1291 static public implicit operator LSLInteger(uint u)