SEEK END was off by one.

This commit is contained in:
Godzil 2022-05-27 11:21:56 +01:00 committed by Manoel Trapier
parent 49f2cba7f4
commit b6f0880a98

View File

@ -129,7 +129,7 @@ int miniffs_seek(file_t *file, size_t offset, int whence)
file->offset += offset;
break;
case MFFS_SEEK_END:
file->offset = file->fent->size - offset;
file->offset = file->fent->size - 1 - offset;
break;
}
miniffs_seterror(MINIFFS_NOERROR);