From: tony mancill <tmancill@debian.org>
Date: Sun, 05 Aug 2018 15:13:12 -0700
Subject: fix the Java version -> double parsing to be more generic

--- a/geogebra/util/Util.java
+++ b/geogebra/util/Util.java
@@ -282,8 +282,15 @@
 
 	if (vm_version.startsWith("1.4.2"))
 	    return 1.42;
-	else
-	    vm_version = vm_version.substring(0, 3);
+	else {
+            // trim the version string if it contains more than one decimal place
+            if (vm_version.indexOf('.') > 0) {
+		final int secondDecimal = vm_version.indexOf('.', vm_version.indexOf('.') + 1);
+                if (secondDecimal > 0) {
+	            vm_version = vm_version.substring(0, secondDecimal);
+                }
+            }
+        }
 	try {
 	    return Double.parseDouble(vm_version);
 	} catch (Exception e) {
