summaryrefslogtreecommitdiff
path: root/firmware/drivers/fat.c
diff options
context:
space:
mode:
authorHardeep Sidhu <dyp@pobox.com>2002-08-24 18:36:08 +0000
committerHardeep Sidhu <dyp@pobox.com>2002-08-24 18:36:08 +0000
commite60a999ca08545b8e699b6b8439387b66d390e38 (patch)
treea0c21f99f931b11e1228c59d4b7e7ae0b63a936a /firmware/drivers/fat.c
parentf9e7ed4694d438fb63bde7fa5169f7b3cb5ad4bb (diff)
downloadrockbox-e60a999ca08545b8e699b6b8439387b66d390e38.tar.gz
rockbox-e60a999ca08545b8e699b6b8439387b66d390e38.zip
Fixed minor bug in previous change: 0 is a valid sector
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1969 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/fat.c')
-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);