aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs1
2 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 4c4eff9..5f8b541 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -1436,7 +1436,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1436 1436
1437 public LSLInteger(string s) 1437 public LSLInteger(string s)
1438 { 1438 {
1439 Regex r = new Regex("^[ ]*-?[0-9][0-9xX]?[0-9a-fA-F]*"); 1439 Regex r = new Regex("(^[ ]*0[xX][0-9A-Fa-f][0-9A-Fa-f]*)|(^[ ]*-?[0-9][0-9]*)");
1440 Match m = r.Match(s); 1440 Match m = r.Match(s);
1441 string v = m.Groups[0].Value; 1441 string v = m.Groups[0].Value;
1442 1442
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
index 957a3b6..1d3ffd5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
@@ -64,6 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
64 m_stringIntSet.Add("-99999999", -99999999); 64 m_stringIntSet.Add("-99999999", -99999999);
65 m_stringIntSet.Add("", 0); 65 m_stringIntSet.Add("", 0);
66 m_stringIntSet.Add("aa", 0); 66 m_stringIntSet.Add("aa", 0);
67 m_stringIntSet.Add("56foo", 56);
67 m_stringIntSet.Add("42", 42); 68 m_stringIntSet.Add("42", 42);
68 m_stringIntSet.Add("42 is the answer", 42); 69 m_stringIntSet.Add("42 is the answer", 42);
69 m_stringIntSet.Add(" 42", 42); 70 m_stringIntSet.Add(" 42", 42);