diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs index febc5e1..5a98f4d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | |||
@@ -726,19 +726,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
726 | if ("LSL_Types.LSLFloat" == c.Type) | 726 | if ("LSL_Types.LSLFloat" == c.Type) |
727 | { | 727 | { |
728 | int dotIndex = c.Value.IndexOf('.') + 1; | 728 | int dotIndex = c.Value.IndexOf('.') + 1; |
729 | // Skip first dot (in type name) | ||
730 | dotIndex = c.Value.IndexOf('.', dotIndex) + 1; | ||
731 | 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]))) |
732 | 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+"\")"; | ||
733 | } | 740 | } |
734 | 741 | ||
735 | // commented because the parser does it now | ||
736 | // need to quote strings | ||
737 | // if ("LSL_Types.LSLString" == c.Type) | ||
738 | // retstr += Generate("\""); | ||
739 | retstr += Generate(c.Value, c); | 742 | retstr += Generate(c.Value, c); |
740 | // if ("LSL_Types.LSLString" == c.Type) | ||
741 | // retstr += Generate("\""); | ||
742 | 743 | ||
743 | return retstr; | 744 | return retstr; |
744 | } | 745 | } |