Skip to content

Commit 7af2eae

Browse files
committed
Fix: Percentage.cs ToString() with invariant culture
1 parent c7a05c7 commit 7af2eae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Solana.Unity.Dex/Math/Percentage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@ public static Percentage FromDouble(double dValue)
150150
{
151151
double dTemp = dValue;
152152
long iMultiple = 1;
153-
string strTemp = dValue.ToString();
153+
string strTemp = dValue.ToString(System.Globalization.CultureInfo.InvariantCulture);
154154
while (strTemp.IndexOf("E") > 0) // if in the form like 12E-9
155155
{
156156
dTemp *= 10;
157157
iMultiple *= 10;
158-
strTemp = dTemp.ToString();
158+
strTemp = dTemp.ToString(System.Globalization.CultureInfo.InvariantCulture);
159159
}
160160
int i = 0;
161161
while (strTemp[i] != '.')

0 commit comments

Comments
 (0)