From 28e71f29204c45ae65d24b63fca642708270b982 Mon Sep 17 00:00:00 2001 From: Michael Chisholm Date: Sun, 4 Nov 2007 09:50:39 +0000 Subject: [PATCH] _FAT_fat_nextCluster now returns CLUSTER_FREE when input cluster is CLUSTER_FREE --- source/file_allocation_table.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/file_allocation_table.c b/source/file_allocation_table.c index 287f30f..dea021f 100644 --- a/source/file_allocation_table.c +++ b/source/file_allocation_table.c @@ -37,6 +37,9 @@ 2007-10-25 - Chishm * Use CLUSTER_ERROR when an error occurs with the FAT, not CLUSTER_FREE + + 2007-11-04 - Chishm + * _FAT_fat_nextCluster returns CLUSTER_FREE when input cluster is CLUSTER_FREE */ @@ -53,6 +56,10 @@ u32 _FAT_fat_nextCluster(PARTITION* partition, u32 cluster) u32 sector; int offset; + if (cluster == CLUSTER_FREE) { + return CLUSTER_FREE; + } + switch (partition->filesysType) { case FS_UNKNOWN: