Commit 37ac7d8c authored by Him188's avatar Him188

Fix adjustImageId

parent 83432a9e
...@@ -69,7 +69,8 @@ private operator fun String.get(range: IntRange) = this.substring(range) ...@@ -69,7 +69,8 @@ private operator fun String.get(range: IntRange) = this.substring(range)
// 需要调整 {724D9512-2B54-EEAC-1E21-4AAAC37259DF}.gif // 需要调整 {724D9512-2B54-EEAC-1E21-4AAAC37259DF}.gif
private fun String.adjustImageId() = private fun String.adjustImageId() =
"{${this[0..7]}-${this[8..11]}-${this[12..15]}-${this[16..19]}-${this[20..31]}}.${this.substringAfterLast(".")}" if (this.first() == '{') this
else "{${this[0..7]}-${this[8..11]}-${this[12..15]}-${this[16..19]}-${this[20..31]}}.${this.substringAfterLast(".")}"
internal fun ByteReadPacket.readMessage(): Message? { internal fun ByteReadPacket.readMessage(): Message? {
val messageType = this.readByte().toInt() val messageType = this.readByte().toInt()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment