mirror of
https://github.com/jie65535/JDice.git
synced 2026-10-30 13:42:14 +08:00
Fix value bounds
This commit is contained in:
1 parent
44959fcf62
commit
f631218c0c
1 file changed
+1
-1
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user