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:
parent
08d4f91c8b
commit
c47718b09d
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user