Merge pull request #9 from jannic-dev-forks/fix-total-len-slice

Fix calculation of slice index
This commit is contained in:
Dario Nieuwenhuis 2022-08-31 02:51:15 +02:00 committed by GitHub
commit 2bd7205c79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -762,7 +762,7 @@ where
let bus = unsafe { &mut *bus };
async {
bus.write(&[cmd]).await?;
bus.write(&buf[..(total_len + 3 / 4)]).await?;
bus.write(&buf[..(total_len / 4)]).await?;
Ok(())
}
})