From b22aeaea1f8eed30f1f2f2f84af38b03f3595f8a Mon Sep 17 00:00:00 2001 From: mafiesto4 Date: Wed, 4 Sep 2019 11:14:47 +0200 Subject: [PATCH] Fix parsing values (cherry picked from commit 3239b1fac5fa7c6caafee5a40829923db1ebde9f) --- FlaxEditor/Utilities/ShuntingYardParser.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FlaxEditor/Utilities/ShuntingYardParser.cs b/FlaxEditor/Utilities/ShuntingYardParser.cs index d718a387..6455cb42 100644 --- a/FlaxEditor/Utilities/ShuntingYardParser.cs +++ b/FlaxEditor/Utilities/ShuntingYardParser.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Text; @@ -258,7 +259,7 @@ public static double EvaluateRPN(IEnumerable tokens) { if (token.Type == TokenType.Number) { - stack.Push(double.Parse(token.Value)); + stack.Push(double.Parse(token.Value, NumberStyles.Float | NumberStyles.AllowThousands, CultureInfo.InvariantCulture)); } else if (token.Type == TokenType.Variable) {