fs/fat/fs_fat32.c: Fixes issue when seeking to end of file where we move one too many clusters ahead due to < vs <= logic. This causes us to move past the last cluster in the file.

This commit is contained in:
Anthony Merlino 2019-01-05 14:55:59 -06:00 committed by Gregory Nutt
parent 3e8bd2b5dc
commit 7ffe023766

View File

@ -1159,7 +1159,7 @@ static off_t fat_seek(FAR struct file *filep, off_t offset, int whence)
*/
ff->ff_currentcluster = cluster;
if (position < clustersize)
if (position <= clustersize)
{
break;
}