From 3116e9d9d8bc53acdd7eab720a1a9f6bc74ebfd7 Mon Sep 17 00:00:00 2001 From: Oakchris1955 <80592203+Oakchris1955@users.noreply.github.com> Date: Sat, 27 Jul 2024 14:30:11 +0300 Subject: [PATCH] fix: due to a bug in the code, files larger than 1 cluster wouldn't be read properly --- src/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs.rs b/src/fs.rs index d8c321a..39a5444 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -640,7 +640,7 @@ where } } - match self.fs.read_nth_FAT_entry(self.entry.data_cluster)? { + match self.fs.read_nth_FAT_entry(current_cluster)? { FATEntry::Allocated(next_cluster) => current_cluster = next_cluster, _ => return Err(FSError::UnexpectedEOF), };