1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-23 07:26:58 +00:00

Fix getNextVersion

This commit is contained in:
Andrew Kvapil 2024-08-04 14:57:09 +02:00 committed by GitHub
parent 08d4f91c8b
commit c47718b09d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -143,7 +143,7 @@ fun getNextVersion(version: String): String {
val lastIndex = mainVersion.lastIndexOf('.') val lastIndex = mainVersion.lastIndexOf('.')
if (lastIndex < 0) throw IllegalArgumentException("Cannot parse version format \"$version\"") if (lastIndex < 0) throw IllegalArgumentException("Cannot parse version format \"$version\"")
val lastVersion = try { val lastVersion = try {
version.substring(lastIndex + 1).toInt() mainVersion.substring(lastIndex + 1).toInt()
} catch (e: NumberFormatException) { } catch (e: NumberFormatException) {
throw IllegalArgumentException("Cannot parse version format \"$version\"", e) throw IllegalArgumentException("Cannot parse version format \"$version\"", e)
} }