Bug 950986: Use ToDouble() to convert version to a double independent of locale. r=doug.turner

This commit is contained in:
Marina Samuel 2014-01-08 12:22:24 -05:00
parent 6ccce03e88
commit 035f74946d

View File

@ -181,7 +181,8 @@ nsSystemInfo::Init()
nsAutoString version;
rv = GetPropertyAsAString(NS_LITERAL_STRING("version"), version);
NS_ENSURE_SUCCESS(rv, rv);
double versionDouble = atof(NS_ConvertUTF16toUTF8(version).get());
double versionDouble = version.ToDouble(&rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = SetPropertyAsBool(NS_ConvertASCIItoUTF16("hasWindowsTouchInterface"),
versionDouble >= 6.2);