diff --git a/src/endian.rs b/src/endian.rs index 553b952..31659e2 100644 --- a/src/endian.rs +++ b/src/endian.rs @@ -396,7 +396,7 @@ impl Converter for LittleEndian // Strings start with the size of bytes to read as // a u64. So read that in and then we know how many // bytes make up the string. - byte_count = BigEndian::bytes_to_u64(buffer); + byte_count = BigEndian::bytes_to_u64(&buffer[0..U64_BYTES-1]); if byte_count > 0 {