From 9054f89984d137966fe94655529ed7e22f4c7301 Mon Sep 17 00:00:00 2001 From: Pablo Curiel Date: Sun, 26 Jun 2022 03:49:56 +0200 Subject: [PATCH] Update FatFs to latest patch. --- source/fatfs/ff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/fatfs/ff.c b/source/fatfs/ff.c index d209605..92e716e 100644 --- a/source/fatfs/ff.c +++ b/source/fatfs/ff.c @@ -5957,7 +5957,7 @@ FRESULT f_mkfs ( sz_fat = (DWORD)((sz_vol / sz_au + 2) * 4 + ss - 1) / ss; /* Number of FAT sectors */ b_data = (b_fat + sz_fat + sz_blk - 1) & ~((LBA_t)sz_blk - 1); /* Align data area to the erase block boundary */ if (b_data - b_vol >= sz_vol / 2) LEAVE_MKFS(FR_MKFS_ABORTED); /* Too small volume? */ - n_clst = (DWORD)(sz_vol - (b_data - b_vol)) / sz_au; /* Number of clusters */ + n_clst = (DWORD)((sz_vol - (b_data - b_vol)) / sz_au); /* Number of clusters */ if (n_clst <16) LEAVE_MKFS(FR_MKFS_ABORTED); /* Too few clusters? */ if (n_clst > MAX_EXFAT) LEAVE_MKFS(FR_MKFS_ABORTED); /* Too many clusters? */ @@ -6524,7 +6524,7 @@ static void putc_bfd (putbuff* pb, TCHAR c) if ((BYTE)c < 0x80) break; /* Single byte? */ if (((BYTE)c & 0xE0) == 0xC0) pb->ct = 1; /* 2-byte sequence? */ if (((BYTE)c & 0xF0) == 0xE0) pb->ct = 2; /* 3-byte sequence? */ - if (((BYTE)c & 0xF1) == 0xF0) pb->ct = 3; /* 4-byte sequence? */ + if (((BYTE)c & 0xF8) == 0xF0) pb->ct = 3; /* 4-byte sequence? */ return; } else { /* In the multi-byte sequence */ if (((BYTE)c & 0xC0) != 0x80) { /* Broken sequence? */ @@ -6979,4 +6979,3 @@ FRESULT f_setcp ( return FR_OK; } #endif /* FF_CODE_PAGE == 0 */ -