From 28dd37bdec95ba22f49ccc1f8e33413c4e4e48a7 Mon Sep 17 00:00:00 2001 From: PoliEcho Date: Thu, 31 Jul 2025 21:07:08 +0200 Subject: [PATCH] remove off by 1 error --- src/client/net.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/net.rs b/src/client/net.rs index 616128a..5c736e1 100644 --- a/src/client/net.rs +++ b/src/client/net.rs @@ -637,7 +637,7 @@ pub async fn handle_incoming_connection( &network.read().unwrap().key, &buf[P2PStandardDataPositions::IV as usize ..P2PStandardDataPositions::IV as usize + BLOCK_SIZE], - &buf[P2PStandardDataPositions::DATA as usize..data_lenght as usize-1 /*compensate for size and index diference*/], + &buf[P2PStandardDataPositions::DATA as usize..data_lenght as usize /*compensate for size and index diference*/], ) { Ok(v) => { data_tmp = v.into_boxed_slice();