From 1ee9e865022e178a49641c4fc42d9b85c10fc45f Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Wed, 15 Jul 2020 19:11:48 +1000 Subject: [PATCH] When disconnecting from server due to invalid opcode, also include opcode of last valid packet in message --- src/Server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Server.c b/src/Server.c index c422b2231..b3d21bef7 100644 --- a/src/Server.c +++ b/src/Server.c @@ -365,7 +365,7 @@ static void DisconnectInvalidOpcode(cc_uint8 opcode) { String tmp; char tmpBuffer[STRING_SIZE]; String_InitArray(tmp, tmpBuffer); - String_Format1(&tmp, "Server sent invalid packet %b!", &opcode); + String_Format2(&tmp, "Server sent invalid packet %b! (prev %b)", &opcode, &net_lastOpcode); Game_Disconnect(&title, &tmp); return; }