Using InvariantCulture when converting toDouble to prevent format exception causing the Burger menu to stay open.

This commit is contained in:
Papus Koulibaly 2019-05-27 10:52:08 -04:00
commit e462ba43c4

View file

@ -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() == '-')
{ {