From 551c097db981f72cbb7e95dff47fce923a87d68c Mon Sep 17 00:00:00 2001 From: Stolen Ruby Date: Fri, 7 Dec 2018 04:20:05 -0800 Subject: [PATCH] Added support for f suffix on YEngine floats Signed-off-by: UbitUmarov --- .../ScriptEngine/YEngine/MMRScriptTokenize.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/YEngine/MMRScriptTokenize.cs b/OpenSim/Region/ScriptEngine/YEngine/MMRScriptTokenize.cs index 6c233bc24c..199216eea4 100644 --- a/OpenSim/Region/ScriptEngine/YEngine/MMRScriptTokenize.cs +++ b/OpenSim/Region/ScriptEngine/YEngine/MMRScriptTokenize.cs @@ -784,6 +784,22 @@ namespace OpenSim.Region.ScriptEngine.Yengine } exponent = x; } + if ((c == 'F') || (c == 'f')) + { + if (++j >= source.Length) + { + TokenError(i, "f at end of source"); + return j; + } + + c = source[j]; + if (((c >= '0') && (c <= '9')) || c == '.' || ((c == 'E') || (c == 'e')) || ((c == 'F') || (c == 'f'))) + { + TokenError(j-1, "Syntax error"); + return j; + } + break; + } break; } if(!decimals)