Use invariant culture for parsing double values
This commit is contained in:
parent
1be2939f25
commit
a313826830
|
@ -3,6 +3,7 @@
|
|||
// Licensed under the terms described in the LICENSE file in the root of this project.
|
||||
//
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Xml;
|
||||
using static ColorTool.ConsoleAPI;
|
||||
|
||||
|
@ -45,15 +46,15 @@ namespace ColorTool
|
|||
{
|
||||
if (c.InnerText == RED_KEY)
|
||||
{
|
||||
r = (int)(255 * Convert.ToDouble(c.NextSibling.InnerText));
|
||||
r = (int)(255 * Convert.ToDouble(c.NextSibling.InnerText, CultureInfo.InvariantCulture));
|
||||
}
|
||||
else if (c.InnerText == GREEN_KEY)
|
||||
{
|
||||
g = (int)(255 * Convert.ToDouble(c.NextSibling.InnerText));
|
||||
g = (int)(255 * Convert.ToDouble(c.NextSibling.InnerText, CultureInfo.InvariantCulture));
|
||||
}
|
||||
else if (c.InnerText == BLUE_KEY)
|
||||
{
|
||||
b = (int)(255 * Convert.ToDouble(c.NextSibling.InnerText));
|
||||
b = (int)(255 * Convert.ToDouble(c.NextSibling.InnerText, CultureInfo.InvariantCulture));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue