diff --git a/components/dfs/filesystems/romfs/dfs_romfs.c b/components/dfs/filesystems/romfs/dfs_romfs.c index ef825864ac81552f0fa4ae09dde36eea4a60320d..b5effaf81c53770ce4c51b3c3582c12d8ac42402 100644 --- a/components/dfs/filesystems/romfs/dfs_romfs.c +++ b/components/dfs/filesystems/romfs/dfs_romfs.c @@ -119,7 +119,7 @@ int dfs_romfs_read(struct dfs_fd* file, void *buf, rt_size_t count) int dfs_romfs_lseek(struct dfs_fd* file, rt_off_t offset) { - if (offset < file->size) + if (offset <= file->size) { file->pos = offset; return file->pos;