Skip to content

Commit

Permalink
chore: use CultureInfo.InvariantCulture for BigInts (#2637)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Jul 14, 2023
1 parent 8e8f899 commit db21766
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ internal static object Serialize(object value, List<EvaluateArgumentGuidElement>

if (value is BigInteger bigInteger)
{
return new { bi = bigInteger.ToString() };
return new { bi = bigInteger.ToString(CultureInfo.InvariantCulture) };
}

if (value is Regex regex)
Expand Down Expand Up @@ -327,7 +327,7 @@ private static object ParseEvaluateResultToExpando(JsonElement result, IDictiona

if (result.TryGetProperty("bi", out var bigInt))
{
return BigInteger.Parse(bigInt.ToObject<string>());
return BigInteger.Parse(bigInt.ToObject<string>(), CultureInfo.InvariantCulture);
}

if (result.TryGetProperty("r", out var regex))
Expand Down

0 comments on commit db21766

Please sign in to comment.