last cluster is valid for allocation

This commit is contained in:
Dave Murphy 2010-10-12 11:36:42 +00:00
parent 81110882db
commit 7f77d19460

View File

@ -246,7 +246,7 @@ uint32_t _FAT_fat_linkFreeCluster(PARTITION* partition, uint32_t cluster) {
} }
partition->fat.firstFree = firstFree; partition->fat.firstFree = firstFree;
if ((cluster >= CLUSTER_FIRST) && (cluster < lastCluster)) if ((cluster >= CLUSTER_FIRST) && (cluster <= lastCluster))
{ {
// Update the linked from FAT entry // Update the linked from FAT entry
_FAT_fat_writeFatEntry (partition, cluster, firstFree); _FAT_fat_writeFatEntry (partition, cluster, firstFree);