mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-21 07:56:56 +08:00
Fix TarsInput, fix #1998
This commit is contained in:
parent
7a6c7a89c0
commit
ed37609731
@ -78,7 +78,12 @@ internal class TarsInput(
|
||||
if (input.endOfInput) {
|
||||
return null
|
||||
}
|
||||
val var2 = input.readUByte()
|
||||
val var2 = try {
|
||||
input.readUByte()
|
||||
} catch (e: EOFException) {
|
||||
// somehow `endOfInput` still returns false
|
||||
return null
|
||||
}
|
||||
val type = var2 and 15u
|
||||
var tag = var2.toUInt() shr 4
|
||||
if (tag == 15u) {
|
||||
|
Loading…
Reference in New Issue
Block a user