mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-11 21:30:11 +08:00
Fix #220
This commit is contained in:
parent
6d57f44e91
commit
47a288c614
@ -140,7 +140,7 @@ internal object HighwayHelper {
|
||||
val headLength = readInt()
|
||||
discardExact(4)
|
||||
val proto = readProtoBuf(CSDataHighwayHead.RspDataHighwayHead.serializer(), length = headLength)
|
||||
check(proto.errorCode == 0) { "image upload failed: Transfer errno=${proto.errorCode}" }
|
||||
check(proto.errorCode == 0) { "highway transfer failed, error ${proto.errorCode}" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ internal fun UByteArray.toUHexString(separator: String = " ", offset: Int = 0, l
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
internal inline fun ByteArray.encodeToString(offset: Int = 0, charset: Charset = Charsets.UTF_8): String =
|
||||
String(this, charset = charset, offset = offset)
|
||||
String(this, charset = charset, offset = offset, length = this.size - offset)
|
||||
|
||||
@PublishedApi
|
||||
internal inline fun ByteArray.toReadPacket(offset: Int = 0, length: Int = this.size - offset) =
|
||||
|
Loading…
Reference in New Issue
Block a user