diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-12-11 20:29:42 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-05-27 21:54:33 +0200 |
commit | c559755ff6a434ca76571f5577f123ba4aadf52b (patch) | |
tree | 16c30116e60cdfbf62bd6fa204e18cf39f6a4706 /ui/src/main/java/com | |
parent | e9243c403ad7c80c87c632e3e4f0cf70ff959b18 (diff) |
version: automatically generate version string from tag
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
Diffstat (limited to 'ui/src/main/java/com')
-rw-r--r-- | ui/src/main/java/com/wireguard/android/updater/Updater.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/src/main/java/com/wireguard/android/updater/Updater.kt b/ui/src/main/java/com/wireguard/android/updater/Updater.kt index dbdbacfe..adcb3836 100644 --- a/ui/src/main/java/com/wireguard/android/updater/Updater.kt +++ b/ui/src/main/java/com/wireguard/android/updater/Updater.kt @@ -152,7 +152,10 @@ object Updater { throw InvalidParameterException("Version has no parts") parts = ULongArray(strParts.size) for (i in parts.indices) { - parts[i] = strParts[i].toULong() + if (strParts[i][0] == 'g') + parts[i] = strParts[i].substring(1).toULong(16) + else + parts[i] = strParts[i].toULong() } } |