diff --git a/mirai-core-utils/src/commonMain/kotlin/RandomUtils.kt b/mirai-core-utils/src/commonMain/kotlin/RandomUtils.kt index 8534ddd7f..bc1da08cf 100644 --- a/mirai-core-utils/src/commonMain/kotlin/RandomUtils.kt +++ b/mirai-core-utils/src/commonMain/kotlin/RandomUtils.kt @@ -55,4 +55,4 @@ public fun getRandomString(length: Int, vararg charRanges: CharRange, random: Ra public fun getRandomIntString(length: Int, random: Random = Random): String = - getRandomString(length, *intCharRanges, random = random) \ No newline at end of file + getRandomString(length, charRanges = intCharRanges, random = random) \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/image/ImgStore.kt b/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/image/ImgStore.kt index 71d3ca51f..399b22f5d 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/image/ImgStore.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/image/ImgStore.kt @@ -22,7 +22,7 @@ import kotlin.random.Random import kotlin.random.nextInt internal fun getRandomString(length: Int): String = - getRandomString(length, *defaultRanges) + getRandomString(length, charRanges = defaultRanges) private val defaultRanges: Array<CharRange> = arrayOf('a'..'z', 'A'..'Z', '0'..'9')