aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-08-31 02:51:15 +0200
committerGitHub <[email protected]>2022-08-31 02:51:15 +0200
commit2bd7205c79968ba2121ece47a025ac1a90b30893 (patch)
tree49f718ce3ec80d8f99059842597fce52023f87fa /src
parent69e92e5639e0a86994c9bdf647a0f2d57f768898 (diff)
parentacaa8b3e8b80ccd49e04a6dc7d595d3a52d1ad0d (diff)
Merge pull request #9 from jannic-dev-forks/fix-total-len-slice
Fix calculation of slice index
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 8f439cf2f..34170a266 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -762,7 +762,7 @@ where
762 let bus = unsafe { &mut *bus }; 762 let bus = unsafe { &mut *bus };
763 async { 763 async {
764 bus.write(&[cmd]).await?; 764 bus.write(&[cmd]).await?;
765 bus.write(&buf[..(total_len + 3 / 4)]).await?; 765 bus.write(&buf[..(total_len / 4)]).await?;
766 Ok(()) 766 Ok(())
767 } 767 }
768 }) 768 })