From 52d59adf220ccaaaf5c80d86592115c2c86cfa81 Mon Sep 17 00:00:00 2001 From: moqiaoduo <415372363@qq.com> Date: Sun, 22 Jun 2025 20:47:00 +0800 Subject: [PATCH] get_next_cluster fix --- unsegareborn/exfat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unsegareborn/exfat.c b/unsegareborn/exfat.c index 6863580..7554727 100644 --- a/unsegareborn/exfat.c +++ b/unsegareborn/exfat.c @@ -54,6 +54,10 @@ static uint32_t get_next_cluster(ExfatContext* ctx, uint32_t cluster) { if (next >= 0xFFFFFFF8) { return 0; // end-of-chain } + if (next == 0) + { + return cluster + 1; // if cluster in FAT is 0, it means the cluster heap is continous (exfat only) + } return next; }