From d5215b3fdb0bb09e4770d75d66491c39ae96edf3 Mon Sep 17 00:00:00 2001 From: DGh0st Date: Sun, 19 Feb 2017 06:46:06 -0600 Subject: [PATCH] Fixed ios_version_check for iOS 10 by parsing the strings to ints --- depictions/js/ios_version_check.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/depictions/js/ios_version_check.js b/depictions/js/ios_version_check.js index 193098d..ef5ff0d 100644 --- a/depictions/js/ios_version_check.js +++ b/depictions/js/ios_version_check.js @@ -16,7 +16,11 @@ function ios_version_check(minIOS,maxIOS,otherIOS,callBack) { function parseVersionString(version) { var bits = version.split("."); - return [ bits[0], bits[1] ? bits[1] : 0, bits[2] ? bits[2] : 0 ]; + return [ + parseInt(bits[0], 10), + parseInt(bits[1] ? bits[1] : 0, 10), + parseInt(bits[2] ? bits[2] : 0, 10) + ]; } function compareVersions(one, two) { @@ -47,7 +51,11 @@ function ios_version_check(minIOS,maxIOS,otherIOS,callBack) { return 0; } - var osVersion = [ version[2], version[3], version[4] ? version[5] : 0 ], + var osVersion = [ + parseInt(version[2], 10), + parseInt(version[3], 10), + parseInt(version[4] ? version[5] : 0, 10) + ], osString = osVersion[0] + "." + osVersion[1] + (osVersion[2] && osVersion[2] != 0 ? "." + osVersion[2] : ""), minString = minIOS,