aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs12
2 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 4da1b3b..e013369 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4597,8 +4597,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4597 public LSL_Types.LSLInteger llGetFreeMemory() 4597 public LSL_Types.LSLInteger llGetFreeMemory()
4598 { 4598 {
4599 m_host.AddScriptLPS(1); 4599 m_host.AddScriptLPS(1);
4600 NotImplemented("llGetFreeMemory"); 4600// NotImplemented("llGetFreeMemory");
4601 return 0; 4601 // Make scripts desined for LSO happy
4602 return 16384;
4602 } 4603 }
4603 4604
4604 public LSL_Types.LSLString llGetRegionName() 4605 public LSL_Types.LSLString llGetRegionName()
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 572debc..27af8a5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -1689,7 +1689,17 @@ namespace OpenSim.Region.ScriptEngine.Shared
1689 1689
1690 static public explicit operator LSLFloat(string s) 1690 static public explicit operator LSLFloat(string s)
1691 { 1691 {
1692 return new LSLFloat(double.Parse(s)); 1692 Regex r = new Regex("^[ ]*-?[0-9]*\\.?[0-9]*[eE]?-?[0-9]*");
1693 Match m = r.Match(s);
1694 string v = m.Groups[0].Value;
1695
1696 while (v.Length > 0 && v.Substring(0, 1) == " ")
1697 v = v.Substring(1);
1698
1699 if (v == String.Empty)
1700 v = "0";
1701
1702 return new LSLFloat(double.Parse(v));
1693 } 1703 }
1694 1704
1695 static public implicit operator LSLFloat(double d) 1705 static public implicit operator LSLFloat(double d)