Skip to content

Commit

Permalink
fix: double parse culture
Browse files Browse the repository at this point in the history
  • Loading branch information
elringus committed Nov 17, 2024
1 parent 3c666a6 commit 29e1f13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/Naninovel.Common/Expression/Parsing/Parser.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System.Globalization;

namespace Naninovel.Expression;

/// <summary>
Expand Down Expand Up @@ -233,7 +235,7 @@ private IExpression DoVariable (string name)
if (token.Type == TokenType.Number)
{
var content = Consume().Content;
var number = double.Parse(content);
var number = double.Parse(content, CultureInfo.InvariantCulture);
return Map(new Numeric(number), lastToken.Index - content.Length, content.Length);
}
return TryClosure();
Expand Down

0 comments on commit 29e1f13

Please sign in to comment.