aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs
index 631aa54..b16577d 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs
@@ -728,14 +728,18 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
728 int dotIndex = c.Value.IndexOf('.') + 1; 728 int dotIndex = c.Value.IndexOf('.') + 1;
729 if (0 < dotIndex && (dotIndex == c.Value.Length || !Char.IsDigit(c.Value[dotIndex]))) 729 if (0 < dotIndex && (dotIndex == c.Value.Length || !Char.IsDigit(c.Value[dotIndex])))
730 c.Value = c.Value.Insert(dotIndex, "0"); 730 c.Value = c.Value.Insert(dotIndex, "0");
731 c.Value = "new LSL_Types.LSLFloat("+c.Value+")";
732 }
733 else if("LSL_Types.LSLInteger" == c.Type)
734 {
735 c.Value = "new LSL_Types.LSLInteger("+c.Value+")";
736 }
737 else if("LSL_Types.LSLString" == c.Type)
738 {
739 c.Value = "new LSL_Types.LSLString(\""+c.Value+"\")";
731 } 740 }
732 741
733 // need to quote strings
734 if ("LSL_Types.LSLString" == c.Type)
735 retstr += Generate("\"");
736 retstr += Generate(c.Value, c); 742 retstr += Generate(c.Value, c);
737 if ("LSL_Types.LSLString" == c.Type)
738 retstr += Generate("\"");
739 743
740 return retstr; 744 return retstr;
741 } 745 }