fix: empty command kick (#1814)

* fix: piston not  unextending

* chore: make clippy happy

* fix: empty command kick

* chore: oops

---------

Signed-off-by: Greened <108997309+GreenedDev@users.noreply.github.com>
This commit is contained in:
Greened
2026-04-09 16:42:16 +04:00
committed by GitHub
parent eb57afe52c
commit 83c60663f4

View File

@@ -104,7 +104,7 @@ impl<R: Read> NetworkReadExt for R {
fn read_boxed_slice(&mut self, length: usize) -> Result<Box<[u8]>, ReadingError> {
// Increase this to at least 2MB to handle larger Bedrock batches
const MAX_SLICE_LENGTH: usize = 2 * 1024 * 1024; // 2MB
if !(1..=MAX_SLICE_LENGTH).contains(&length) {
if !(0..=MAX_SLICE_LENGTH).contains(&length) {
return Err(ReadingError::Message(format!(
"read_boxed_slice: length {length} out of bounds"
)));