mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-23 06:25:19 -07:00
Using InvariantCulture when converting toDouble to prevent format exception causing the Burger menu to stay open.
This commit is contained in:
parent
eb480e58a5
commit
e462ba43c4
1 changed files with 1 additions and 1 deletions
|
@ -1138,7 +1138,7 @@ namespace CalculatorApp.ViewModel
|
||||||
}
|
}
|
||||||
|
|
||||||
string resultHolder = result;
|
string resultHolder = result;
|
||||||
if ((stringToLocalize.front() == '-' && System.Convert.ToDouble(stringToLocalize) == 0) || resultHolder.back() == '-')
|
if ((stringToLocalize.front() == '-' && System.Convert.ToDouble(stringToLocalize, CultureInfo.InvariantCulture) == 0) || resultHolder.back() == '-')
|
||||||
{
|
{
|
||||||
if (resultHolder.back() == '-')
|
if (resultHolder.back() == '-')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue