diff options
-rw-r--r-- | firmware/drivers/fat.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 15974f4cbc..9a81107725 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c @@ -891,7 +891,7 @@ int fat_read( struct fat_file *file, int sectorcount, void* buf ) int fat_seek(struct fat_file *file, int seeksector ) { int cluster = file->firstcluster; - int sector = seeksector; + int sector = cluster2sec(cluster); int numsec = 0; int i; @@ -913,11 +913,6 @@ int fat_seek(struct fat_file *file, int seeksector ) sector++; } } - else { - sector = cluster2sec(cluster); - if (sector<0) - return -2; - } file->nextcluster = cluster; file->nextsector = sector; |