Skip to content

Commit

Permalink
0.1.3
Browse files Browse the repository at this point in the history
Culture fix for number conversion... attempt #1
  • Loading branch information
soupday committed Jul 27, 2021
1 parent 1b56497 commit 0ac9023
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Editor/QuickJSON.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ void ParseNumber(string name)
{
string value = Value();

System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Number;
System.Globalization.CultureInfo culture = System.Globalization.CultureInfo.InvariantCulture;

if (int.TryParse(value, out int tryInt))
values.Add(new MultiValue(name, tryInt));
else if (float.TryParse(value, out float tryFloat))
else if (float.TryParse(value, style, culture, out float tryFloat))
values.Add(new MultiValue(name, tryFloat));
}

Expand Down

0 comments on commit 0ac9023

Please sign in to comment.