diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs index 2226673..b357ab6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | |||
@@ -726,16 +726,19 @@ 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; | ||
729 | if (0 < dotIndex && (dotIndex == c.Value.Length || !Char.IsDigit(c.Value[dotIndex]))) | 731 | if (0 < dotIndex && (dotIndex == c.Value.Length || !Char.IsDigit(c.Value[dotIndex]))) |
730 | c.Value = c.Value.Insert(dotIndex, "0"); | 732 | c.Value = c.Value.Insert(dotIndex, "0"); |
731 | } | 733 | } |
732 | 734 | ||
735 | // commencted because the parser does it now | ||
733 | // need to quote strings | 736 | // need to quote strings |
734 | if ("LSL_Types.LSLString" == c.Type) | 737 | // if ("LSL_Types.LSLString" == c.Type) |
735 | retstr += Generate("\""); | 738 | // retstr += Generate("\""); |
736 | retstr += Generate(c.Value, c); | 739 | retstr += Generate(c.Value, c); |
737 | if ("LSL_Types.LSLString" == c.Type) | 740 | // if ("LSL_Types.LSLString" == c.Type) |
738 | retstr += Generate("\""); | 741 | // retstr += Generate("\""); |
739 | 742 | ||
740 | return retstr; | 743 | return retstr; |
741 | } | 744 | } |