Skip to content

Commit 4c85bc1

Browse files
authored
Use invariant culture when parsing fractions (#443)
1 parent 9bd8ed6 commit 4c85bc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/KubernetesClient/ResourceQuantity.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Globalization;
34
using System.Linq;
45
using System.Numerics;
56
using Fractions;
@@ -198,7 +199,7 @@ partial void CustomInit()
198199
si = value.Length;
199200
}
200201

201-
var literal = Fraction.FromString(value.Substring(0, si));
202+
var literal = Fraction.FromString(value.Substring(0, si), CultureInfo.InvariantCulture);
202203
var suffixer = new Suffixer(value.Substring(si));
203204

204205
_unitlessValue = literal.Multiply(Fraction.Pow(suffixer.Base, suffixer.Exponent));

0 commit comments

Comments
 (0)