diff --git a/app/src/main/java/de/westnordost/streetcomplete/util/GeoUri.kt b/app/src/main/java/de/westnordost/streetcomplete/util/GeoUri.kt index 6f0ca2642a..0b7e602445 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/util/GeoUri.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/util/GeoUri.kt @@ -5,7 +5,7 @@ import de.westnordost.streetcomplete.util.ktx.format fun parseGeoUri(uri: String): GeoLocation? { if (!uri.startsWith("geo:")) return null - val geoUriRegex = Regex("(-?[0-9]*\\.?[0-9]+),(-?[0-9]*\\.?[0-9]+).*?(?:\\?z=([0-9]*\\.?[0-9]+))?") + val geoUriRegex = Regex("(-?[0-9]*\\.?[0-9]+),(-?[0-9]*\\.?[0-9]+).*?(?:\\?z=([0-9]*\\.?[0-9]+))?.*") val match = geoUriRegex.matchEntire(uri.substringAfter("geo:")) ?: return null val latitude = match.groupValues[1].toDoubleOrNull() ?: return null