Skip to content

Commit cd09880

Browse files
bors[bot]olback
andauthored
Merge #290
290: [Bug] Fix sdcard size truncation r=richardeoin a=olback Co-authored-by: Edwin Svensson <[email protected]>
2 parents d3ff76d + ad42dfa commit cd09880

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sdmmc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ macro_rules! sdmmc {
11871187

11881188
fn num_blocks(&self) -> Result<embedded_sdmmc::BlockCount, Self::Error> {
11891189
let sdmmc = self.sdmmc.borrow_mut();
1190-
Ok(embedded_sdmmc::BlockCount(sdmmc.card()?.size() as u32 / 512u32))
1190+
Ok(embedded_sdmmc::BlockCount((sdmmc.card()?.size() / 512u64) as u32))
11911191
}
11921192

11931193
}

0 commit comments

Comments
 (0)