From f6ce7bb0d933a42546ce9062ee593eec588bc9db Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Thu, 4 Aug 2011 09:13:43 +0000 Subject: [PATCH] fix romfs lseek issue. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1663 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/dfs/filesystems/romfs/dfs_romfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dfs/filesystems/romfs/dfs_romfs.c b/components/dfs/filesystems/romfs/dfs_romfs.c index ef825864a..b5effaf81 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; -- GitLab