Skip to content

Commit 37775f8

Browse files
committed
Fix emoji command truncating values
1 parent 1fe31c0 commit 37775f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bot/src/main/kotlin/ml/duncte123/skybot/commands/utils/EmoteCommand.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,5 @@ class EmoteCommand : Command() {
125125
private fun Int.toHex() = Integer.toHexString(this).uppercase()
126126
private fun Int.getName() = Character.getName(this)
127127
private fun Char.toHex() = this.code.toHex()
128-
private fun String.ensureFourHex() = "0000$this".substring(this.length)
128+
private fun String.ensureFourHex() = "0000$this".substring(this.length.coerceAtMost(4))
129129
}

0 commit comments

Comments
 (0)