Skip to content

Commit a4ddf2c

Browse files
authored
SD library: Fix format
Pass correct work buffer size to f_mkfs
1 parent 5cc91c5 commit a4ddf2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/SD/src/sd_diskio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ bool sdcard_mount(uint8_t pdrv, const char* path, uint8_t max_files, bool format
809809
log_e("alloc for f_mkfs failed");
810810
return false;
811811
}
812-
res = f_mkfs(drv, FM_ANY, 0, work, sizeof(work));
812+
res = f_mkfs(drv, FM_ANY, 0, work, sizeof(BYTE) * FF_MAX_SS);
813813
free(work);
814814
if (res != FR_OK) {
815815
log_e("f_mkfs failed: %s", fferr2str[res]);

0 commit comments

Comments
 (0)