yass007 / FASTBuildMonitor

Event monitor for FASTBuild
MIT License
80 stars 33 forks source link

float.Parse uses the current system culture by default #11

Closed Dominator86 closed 7 years ago

Dominator86 commented 7 years ago

float.Parse throws a System.FormatException on my system because of the unrecognized decimal mark.

You have to pass CultureInfo.InvariantCulture as the second parameter to parse "dot" as the decimal mark on all cultures:

float progressPCT = float.Parse(tokens[CommandArgumentIndex.PROGRESS_STATUS_PROGRESS_PCT], CultureInfo.InvariantCulture);

yass007 commented 7 years ago

Integrated your change in v1.01.

Thanks for your contribution!