From fe94b27507c068be5a0ea42ff37465cdf2126d56 Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Tue, 25 Feb 2025 22:25:44 -0500 Subject: [PATCH] Never try to read long pings packets because that's just another packet --- src/packet/ping.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packet/ping.rs b/src/packet/ping.rs index 82531ae..68c704d 100644 --- a/src/packet/ping.rs +++ b/src/packet/ping.rs @@ -15,7 +15,7 @@ impl BinRead for Ping { args: Self::Args<'_>, ) -> binrw::BinResult { let tick1 = i32::read_options(reader, endian, args)?; - let mut tick2_buf = [0u8; 4]; + /*let mut tick2_buf = [0u8; 4]; if let Ok(count) = reader.read(&mut tick2_buf) { if count == tick2_buf.len() { return Ok(Self { @@ -23,7 +23,7 @@ impl BinRead for Ping { tick2: Some(i32::from_be_bytes(tick2_buf)), }) } - } + }*/ Ok(Self { tick1, tick2: None,