From 27f52e6b07d885637c433a2bf57680a7d2589f2b Mon Sep 17 00:00:00 2001 From: Him188 <Him188@mamoe.net> Date: Wed, 29 Jan 2020 21:58:43 +0800 Subject: [PATCH] Uint type --- .../qqandroid/network/protocol/packet/login/LoginPacket.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt index 0d851e12b..1081ed989 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt @@ -270,17 +270,18 @@ internal object LoginPacket : PacketFactory<LoginPacket.LoginPacketResponse>("wt val subCommand = readUShort().toInt() println("subCommand=$subCommand") - val type = readByte() + val type = readUByte() println("type=$type") discardExact(2) val tlvMap: TlvMap = this.readTLVMap() + tlvMap.printTLVMap() return when (type.toInt()) { 0 -> onLoginSuccess(tlvMap, bot) 1, 15 -> onErrorMessage(tlvMap) 2 -> onSolveLoginCaptcha(tlvMap, bot) - -96 -> onUnsafeDeviceLogin(tlvMap) - -52 /*0xCC=204*/ -> onSMSVerifyNeeded(tlvMap, bot) + 160 /*-96*/ -> onUnsafeDeviceLogin(tlvMap) + 204 /*-52*/ -> onSMSVerifyNeeded(tlvMap, bot) else -> error("unknown login result type: $type") } }