diff --git a/sched/plan_class_spec.cpp b/sched/plan_class_spec.cpp index 1332e9993d..ed8cc0aaaa 100644 --- a/sched/plan_class_spec.cpp +++ b/sched/plan_class_spec.cpp @@ -60,7 +60,7 @@ static double os_version_num(HOST h) { return 0; } -// parse "Android 4.3.1" or "Android 4.3" +// parse version# from "(Android 4.3.1)" or "(Android 4.3)" or "(Android 4)" // static int android_version_num(HOST h) { int maj, min, rel; @@ -75,6 +75,10 @@ static int android_version_num(HOST h) { if (n == 2) { return maj*10000 + min*100; } + n = sscanf(p, "%d", &maj); + if (n == 1) { + return maj*10000; + } return 0; }