summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/fat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index 877beff7f1..c43807b25f 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -888,7 +888,7 @@ int fat_read( struct fat_file *file, int sectorcount, void* buf )
888 return 0; 888 return 0;
889 889
890 /* find sequential sectors and read them all at once */ 890 /* find sequential sectors and read them all at once */
891 for (i=0; i<sectorcount && sector>0; i++ ) { 891 for (i=0; i<sectorcount && sector>=0; i++ ) {
892 numsec++; 892 numsec++;
893 if ( numsec >= fat_bpb.bpb_secperclus ) { 893 if ( numsec >= fat_bpb.bpb_secperclus ) {
894 cluster = get_next_cluster(cluster); 894 cluster = get_next_cluster(cluster);