From f631218c0c4f14e97d4d67dab95de7b2d90008eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AD=B1=E5=82=91?= Date: Tue, 31 Jan 2023 22:32:32 +0800 Subject: [PATCH] Fix value bounds --- src/main/kotlin/JDice.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/JDice.kt b/src/main/kotlin/JDice.kt index e61c1cb..4850bca 100644 --- a/src/main/kotlin/JDice.kt +++ b/src/main/kotlin/JDice.kt @@ -28,7 +28,7 @@ object JDice : KotlinPlugin( val count = if (c.isEmpty()) 1 else c.toInt() val top = d.toInt() if (count > 0 && top > 1) { - val value = random.nextInt(count, count * top) + 1 + val value = random.nextInt(count, count * top + 1) subject.sendMessage(message.quote() + value.toString()) } }